Skip to content

Commit 064b7be

Browse files
robot-ci-heartexniklubnik
authored
fix: DIA-1988: Replace Custom endpoint with OpenAI client (#7150)
Co-authored-by: niklub <[email protected]> Co-authored-by: nik <[email protected]>
1 parent 58648d1 commit 064b7be

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

docs/source/guide/prompts_keys.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ You can find all this information in the **Details** section of the deployment i
102102

103103
You can use your own self-hosted and fine-tuned model as long as it meets the following criteria:
104104

105-
* Your server must provide [JSON mode](https://python.useinstructor.com/concepts/patching/#json-mode) for the LLM.
105+
* Your server must provide [JSON mode](https://js.useinstructor.com/concepts/patching/#json-schema-mode) for the LLM, specifically, the API must accepts `response_format` with `type: json_object` and `schema` with a valid JSON schema: ` {"response_format": {"type": "json_object", "schema": <schema>}}`
106106
* The server API must follow [OpenAI format](https://platform.openai.com/docs/api-reference/chat/create#chat-create-response_format).
107107

108108
Examples of compatible LLMs include [Ollama](https://ollama.com/) and [sglang](https://github.com/sgl-project/sglang?tab=readme-ov-file#openai-compatible-api).
@@ -114,7 +114,7 @@ To add a custom model, enter the following:
114114
* An API key to access the model. An API key is tied to a specific account, but the access is shared within the org if added. (Optional)
115115
* An auth token to access the model API. An auth token provides API access at the server level. (Optional)
116116

117-
### Example
117+
### Example with Ollama
118118

119119
1. Setup [Ollama](https://ollama.com/), e.g. `ollama run llama3.2`
120120
2. [Verify your local OpenAI-compatible API is working](https://ollama.com/blog/openai-compatibility), e.g. `http://localhost:11434/v1`
@@ -124,3 +124,12 @@ To add a custom model, enter the following:
124124
- Endpoint: `https://my.openai.endpoint.com/v1` (note `v1` suffix is required)
125125
- API key: `ollama` (default)
126126
- Auth token: empty
127+
128+
129+
### Example with Hugging Face Inference Endpoints
130+
1. Use [DeepSeek model](https://huggingface.co/deepseek-ai/DeepSeek-R1)
131+
2. In `API Keys`, add to `Custom` provider:
132+
- Name: `deepseek-ai/DeepSeek-R1`
133+
- Endpoint: `https://router.huggingface.co/together/v1`
134+
- API key: `<your-hf-api-key>`
135+
- Auth token: empty

poetry.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ djangorestframework-simplejwt = {extras = ["crypto"], version = "^5.4.0"}
209209
tldextract = ">=5.1.3"
210210

211211
# Humansignal repo dependencies
212-
label-studio-sdk = {url = "https://github.com/HumanSignal/label-studio-sdk/archive/324323c4e50581f25d4aedc7c42922e01a330d7c.zip"}
212+
label-studio-sdk = {url = "https://github.com/HumanSignal/label-studio-sdk/archive/0fecdd0030b8cefe471b574deed3ca19b64ff323.zip"}
213213

214214
[tool.poetry.group.test.dependencies]
215215
pytest = "7.2.2"

0 commit comments

Comments
 (0)