Skip to content

Commit e2c99f7

Browse files
authored
Merge branch 'main' into lio/fix-for-provider
2 parents 6ca20e8 + 765fe5c commit e2c99f7

File tree

4 files changed

+8
-28
lines changed

4 files changed

+8
-28
lines changed

samples/managed-llm-provider/README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ You can configure the `LLM_MODEL` and `LLM_URL` for the LLM separately for local
1515

1616
Ensure you have enabled model access for the model you intend to use. To do this, you can check your [AWS Bedrock model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html) or [GCP Vertex AI model access](https://cloud.google.com/vertex-ai/generative-ai/docs/control-model-access).
1717

18+
To learn about available LLM models in Defang, please see our [Model Mapping documentation](https://docs.defang.io/docs/concepts/managed-llms/openai-access-gateway#model-mapping).
19+
1820
For more about Managed LLMs in Defang, please see our [Managed LLMs documentation](https://docs.defang.io/docs/concepts/managed-llms/managed-language-models).
1921

2022
### Docker Model Provider
@@ -37,18 +39,6 @@ To run the application locally, you can use the following command:
3739
docker compose -f compose.dev.yaml up --build
3840
```
3941

40-
## Configuration
41-
42-
For this sample, you will need to provide the following [configuration](https://docs.defang.io/docs/concepts/configuration):
43-
44-
> Note that if you are using the 1-click deploy option, you can set these values as secrets in your GitHub repository and the action will automatically deploy them for you.
45-
46-
### `LLM_MODEL`
47-
The Model ID of the LLM you are using for your application. For example, `anthropic.claude-3-haiku-20240307-v1:0`.
48-
```bash
49-
defang config set LLM_MODEL
50-
```
51-
5242
## Deployment
5343

5444
> [!NOTE]

samples/managed-llm-provider/compose.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ services:
77
- "8000:8000"
88
restart: always
99
environment:
10-
- LLM_MODEL
10+
- LLM_MODEL=default # LLM model ID used in the Provider Service
11+
# For other models, see https://docs.defang.io/docs/concepts/managed-llms/openai-access-gateway#model-mapping
1112
healthcheck:
1213
test: ["CMD", "python3", "-c", "import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read()", "http://localhost:8000/"]
1314
interval: 30s

samples/managed-llm/README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ You can configure the `MODEL` and `ENDPOINT_URL` for the LLM separately for loca
1717

1818
Ensure you have enabled model access for the model you intend to use. To do this, you can check your [AWS Bedrock model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html) or [GCP Vertex AI model access](https://cloud.google.com/vertex-ai/generative-ai/docs/control-model-access).
1919

20+
To learn about available LLM models in Defang, please see our [Model Mapping documentation](https://docs.defang.io/docs/concepts/managed-llms/openai-access-gateway#model-mapping).
21+
2022
For more about Managed LLMs in Defang, please see our [Managed LLMs documentation](https://docs.defang.io/docs/concepts/managed-llms/managed-language-models).
2123

2224
### Defang OpenAI Access Gateway
@@ -39,18 +41,6 @@ To run the application locally, you can use the following command:
3941
docker compose -f compose.dev.yaml up --build
4042
```
4143

42-
## Configuration
43-
44-
For this sample, you will need to provide the following [configuration](https://docs.defang.io/docs/concepts/configuration):
45-
46-
> Note that if you are using the 1-click deploy option, you can set these values as secrets in your GitHub repository and the action will automatically deploy them for you.
47-
48-
### `MODEL`
49-
The Model ID of the LLM you are using for your application. For example, `anthropic.claude-3-haiku-20240307-v1:0`.
50-
```bash
51-
defang config set MODEL
52-
```
53-
5444
## Deployment
5545

5646
> [!NOTE]

samples/managed-llm/compose.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ services:
88
restart: always
99
environment:
1010
- ENDPOINT_URL=http://llm/api/v1/chat/completions # endpoint to the gateway service
11-
- MODEL=us.amazon.nova-micro-v1:0 # LLM model ID used for the gateway
11+
- MODEL=default # LLM model ID used for the gateway.
12+
# For other models, see https://docs.defang.io/docs/concepts/managed-llms/openai-access-gateway#model-mapping
1213
- OPENAI_API_KEY=FAKE_TOKEN # the actual value will be ignored when using the gateway, but it should match the one in the llm service
1314
healthcheck:
1415
test: ["CMD", "python3", "-c", "import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read()", "http://localhost:8000/"]
@@ -31,8 +32,6 @@ services:
3132
mode: host
3233
environment:
3334
- OPENAI_API_KEY=FAKE_TOKEN # this value must match the one in the app service
34-
- USE_MODEL_MAPPING=false
35-
- DEBUG=true
3635
# if using GCP for BYOC deployment, add these environment variables:
3736
# - GCP_PROJECT_ID=${GCP_PROJECT_ID}
3837
# - GCP_REGION=${GCP_REGION}

0 commit comments

Comments
 (0)