Skip to content

Commit f0a3155

Browse files
committed
Added k8s secret
1 parent 2cf55bf commit f0a3155

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

modules/developer-lightspeed/proc-changing-your-llm-provider.adoc

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,40 @@ The LLM provider configuration section includes a mandatory dummy provider block
1616

1717
.Procedure
1818

19-
You can define additional LLM providers using one of two methods.
19+
You can define additional LLM providers using either of following methods:
2020

21-
* Recommended: In your Developer Lightspeed plugin configuration (For example, the `lightspeed` section within the `lightspeed-app-config.yaml` file), define the new provider or providers under the `lightspeed.servers` key as shown in the following code:
21+
* Recommended: In your Developer Lightspeed plugin configuration (the `lightspeed` section within the `lightspeed-app-config.yaml` file), define the new provider or providers under the `lightspeed.servers` key as shown in the following code:
2222
+
2323
[source,yaml]
2424
----
2525
lightspeed:
2626
servers:
27-
- id: my-new-provider
28-
url: my-new-url
29-
token: my-new-token
27+
- id: _<my_new_provider>_
28+
url: _<my_new_url>_
29+
token: _<my_new_token>_
3030
----
31-
32-
* Alternatively, you can add new LLM providers by updating the rcsconfig.yaml file.
31+
** Alternatively, you can set the `id`, `url`, and `token` values in a Kubernetes Secret and reference them using environment variables in your application configuration as shown in the following code:
32+
+
33+
[source,yaml]
34+
----
35+
env:
36+
- name: _<my_new_url>_
37+
valueFrom:
38+
secretKeyRef:
39+
name: my-secret
40+
key: _<my_new_url>_
41+
- name: _<my_new_provider>_
42+
valueFrom:
43+
secretKeyRef:
44+
name: my-secret
45+
key: _<my_new_provider>_
46+
- name: _<my_new_token>_
47+
valueFrom:
48+
secretKeyRef:
49+
name: my-secret
50+
key: _<my_new_token>_
51+
----
52+
* You can add new LLM providers by updating the `rcsconfig.yaml` file.
3353
.. In the `llm_providers` section within your `rcsconfig.yaml` file, add your new provider configuration below the mandatory dummy provider block as shown in the following code:
3454
+
3555
[source,yaml]
@@ -42,9 +62,9 @@ llm_providers:
4262
models:
4363
- name: dummymodel
4464
# END: Do not remove this block
45-
- name: my-new-providers
65+
- name: _<my_new_providers>_
4666
type: openai
47-
url: my-provider-url
67+
url: _<my_provider_url>_
4868
credentials_path: path/to/token
4969
disable_model_check: true
5070
----

0 commit comments

Comments
 (0)