You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
now that we consolidated the providerspec types and got rid of `AdapterSpec`, adjust external.md and external-provider-guide.md
external_providers_guide.md specifically needed some updates around the proper fields required in a ProviderSpec beyond the changes in this PR.
BREAKING CHANGE: external providers must update their `get_provider_spec` function to use `RemoteProviderSpec` properly
Signed-off-by: Charlie Doern <[email protected]>
Copy file name to clipboardExpand all lines: docs/docs/providers/external/external-providers-guide.mdx
+44-85Lines changed: 44 additions & 85 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,76 +11,52 @@ an example entry in your build.yaml should look like:
11
11
module: ramalama_stack
12
12
```
13
13
14
-
Additionally you can configure the `external_providers_dir` in your Llama Stack configuration. This method is in the process of being deprecated in favor of the `module` method. If using this method, the external provider directory should contain your external provider specifications:
15
-
16
-
```yaml
17
-
external_providers_dir: ~/.llama/providers.d/
18
-
```
19
-
20
-
## Directory Structure
21
-
22
-
The external providers directory should follow this structure:
23
-
24
-
```
25
-
providers.d/
26
-
remote/
27
-
inference/
28
-
custom_ollama.yaml
29
-
vllm.yaml
30
-
vector_io/
31
-
qdrant.yaml
32
-
safety/
33
-
llama-guard.yaml
34
-
inline/
35
-
inference/
36
-
custom_ollama.yaml
37
-
vllm.yaml
38
-
vector_io/
39
-
qdrant.yaml
40
-
safety/
41
-
llama-guard.yaml
42
-
```
43
-
44
-
Each YAML file in these directories defines a provider specification for that particular API.
45
-
46
14
## Provider Types
47
15
48
16
Llama Stack supports two types of external providers:
49
17
50
18
1.**Remote Providers**: Providers that communicate with external services (e.g., cloud APIs)
51
19
2.**Inline Providers**: Providers that run locally within the Llama Stack process
52
20
21
+
22
+
### Provider Specification (Common between inline and remote providers)
23
+
24
+
-`provider_type`: The type of the provider to be installed (remote or inline). eg. `remote::ollama`
25
+
-`api`: The API for this provider, eg. `inference`
26
+
-`config_class`: The full path to the configuration class
27
+
-`module`: The Python module containing the provider implementation
28
+
-`optional_api_dependencies`: List of optional Llama Stack APIs that this provider can use
29
+
-`api_dependencies`: List of Llama Stack APIs that this provider depends on
30
+
-`provider_data_validator`: Optional validator for provider data.
31
+
-`pip_packages`: List of Python packages required by the provider
32
+
53
33
### Remote Provider Specification
54
34
55
35
Remote providers are used when you need to communicate with external services. Here's an example for a custom Ollama provider:
0 commit comments