Skip to content

Commit c02a2b6

Browse files
committed
Add provider model docs
1 parent 5ee58cf commit c02a2b6

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

docs/concepts/managed-llms/managed-language-models.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Leveraging Managed Language Models with Defang
2+
title: Using Managed LLMs
33
description: Defang makes it easy to leverage cloud-native managed language models.
44
sidebar_position: 3000
55
---
@@ -32,7 +32,7 @@ If you already have an OpenAI-compatible application, Defang makes it easy to de
3232

3333
| Provider | Managed Language Models |
3434
| --- | --- |
35-
| [Playground](/docs/providers/playground#managed-large-language-models) | |
35+
| [Playground](/docs/providers/playground#managed-large-language-models) | |
3636
| [AWS Bedrock](/docs/providers/aws#managed-large-language-models) ||
3737
| [DigitalOcean GenAI](/docs/providers/digitalocean#future-improvements) ||
3838
| [GCP Vertex AI](/docs/providers/gcp#managed-large-language-models) ||
Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,44 @@
11
---
2-
title: Deploying OpenAI-compatible apps with Defang
2+
title: OpenAI Access Gateway
33
description: Defang makes it easy to leverage cloud-native managed language models for your OpenAI-compatible application.
44
sidebar_position: 3000
55
---
66

7-
# Deploying OpenAI-compatible applications to cloud-native managed language models with Defang
7+
# OpenAI Access Gateway
88

9-
Defang makes it easy to deploy on your favourite cloud's managed LLM service with our [OpenAI Access Gateway](https://github.com/DefangLabs/openai-access-gateway). This service sits between your application and the cloud service and acts as a compatibility layer. It handles incoming OpenAI requests, translates those requests to the appropriate cloud-native API, handles the native response, and re-constructs an OpenAI-compatible response.
9+
Defang makes it easy to deploy on your favourite cloud's managed LLM service with our [OpenAI Access Gateway](https://github.com/DefangLabs/openai-access-gateway). This service sits between your application and the cloud service and acts as a compatibility layer.
10+
It handles incoming OpenAI requests, translates those requests to the appropriate cloud-native API, handles the native response, and re-constructs an OpenAI-compatible response.
1011

1112
See [our tutorial](/docs/tutorials/deploying-openai-apps-aws-bedrock-gcp-vertex/) which describes how to configure the OpenAI Access Gateway for your application
1213

14+
## Docker Provider Services
15+
16+
As of Docker Compose v2.35 and Docker Desktop v4.41, Compose introduces a new service type called `provider` that allows you to declare platform capabilities required by your application.
17+
For AI models, you use the `model` type to declare model dependencies. This will expose an OpenAI compatible API for your service. Check the [Docker Model Runner documentation](https://docs.docker.com/compose/how-tos/model-runner/) for more details.
18+
19+
```yaml
20+
services:
21+
chat:
22+
build: .
23+
depends_on:
24+
- ai_runner
25+
26+
ai_runner:
27+
provider:
28+
type: model
29+
options:
30+
model: ai/mistral
31+
x-defang-llm: true
32+
```
33+
34+
Under the hood, when you use the `model` provider, Defang will deploy the **OpenAI Access Gateway** in a private network. This allows you to use the same code for both local development and cloud deployment.
35+
The `x-defang-llm` extension is used to configure the appropriate roles and permissions for your service. See the [Managed Language Models](/docs/concepts/managed-llms/managed-language-models/) page for more details.
36+
1337
## Current Support
1438

1539
| Provider | Managed Language Models |
1640
| --- | --- |
17-
| [Playground](/docs/providers/playground#managed-services) | |
41+
| [Playground](/docs/providers/playground#managed-services) | |
1842
| [AWS Bedrock](/docs/providers/aws#managed-llms) | ✅ |
1943
| [DigitalOcean GenAI](/docs/providers/digitalocean#future-improvements) | ❌ |
2044
| [GCP Vertex AI](/docs/providers/gcp#managed-llms) | ✅ |

0 commit comments

Comments
 (0)