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
Copy file name to clipboardExpand all lines: docs/docs/ai/llm.mdx
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,11 @@ CocoIndex integrates with various LLM APIs for these functions.
75
75
To use the OpenAI LLM API, you need to set the environment variable `OPENAI_API_KEY`.
76
76
You can generate the API key from [OpenAI Dashboard](https://platform.openai.com/api-keys).
77
77
78
-
Currently we don't support custom address for OpenAI API.
78
+
If you want to use a custom address, you can either provide the `address` parameter in `LlmSpec` / `EmbedText`, or set the environment variable `OPENAI_API_BASE`. The `address` parameter takes precedence over the environment variable.
79
+
80
+
Spec for OpenAI takes additional `api_config` field, in type `cocoindex.llm.OpenAiConfig` with the following fields:
81
+
-`org_id` (type: `str`, optional): The organization ID of the OpenAI account.
82
+
-`project_id` (type: `str`, optional): The project ID of the OpenAI account.
79
83
80
84
You can find the full list of models supported by OpenAI [here](https://platform.openai.com/docs/models).
0 commit comments