diff --git a/docs/source/guide/prompts_keys.md b/docs/source/guide/prompts_keys.md index db29df4ae7f4..44e439c22d36 100644 --- a/docs/source/guide/prompts_keys.md +++ b/docs/source/guide/prompts_keys.md @@ -102,7 +102,7 @@ You can find all this information in the **Details** section of the deployment i You can use your own self-hosted and fine-tuned model as long as it meets the following criteria: -* Your server must provide [JSON mode](https://python.useinstructor.com/concepts/patching/#json-mode) for the LLM. +* 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": }}` * The server API must follow [OpenAI format](https://platform.openai.com/docs/api-reference/chat/create#chat-create-response_format). 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: * 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) * An auth token to access the model API. An auth token provides API access at the server level. (Optional) -### Example +### Example with Ollama 1. Setup [Ollama](https://ollama.com/), e.g. `ollama run llama3.2` 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: - Endpoint: `https://my.openai.endpoint.com/v1` (note `v1` suffix is required) - API key: `ollama` (default) - Auth token: empty + + +### Example with Hugging Face Inference Endpoints +1. Use [DeepSeek model](https://huggingface.co/deepseek-ai/DeepSeek-R1) +2. In `API Keys`, add to `Custom` provider: + - Name: `deepseek-ai/DeepSeek-R1` + - Endpoint: `https://router.huggingface.co/together/v1` + - API key: `` + - Auth token: empty diff --git a/poetry.lock b/poetry.lock index adfcf5236730..caf6e5386264 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2208,7 +2208,7 @@ python-versions = ">=3.9,<4" groups = ["main"] markers = "python_version >= \"3.12\" or python_version <= \"3.11\"" files = [ - {file = "324323c4e50581f25d4aedc7c42922e01a330d7c.zip", hash = "sha256:c77b4e276c13c1fa016414ffed8ac714fe9a22b3ab094ba1d3efad5dbb934c11"}, + {file = "0fecdd0030b8cefe471b574deed3ca19b64ff323.zip", hash = "sha256:73038bce8d8a2923d866456abc96ae2676ce759847ab53c1ea364815a989da7f"}, ] [package.dependencies] @@ -2233,7 +2233,7 @@ xmljson = "0.2.1" [package.source] type = "url" -url = "https://github.com/HumanSignal/label-studio-sdk/archive/324323c4e50581f25d4aedc7c42922e01a330d7c.zip" +url = "https://github.com/HumanSignal/label-studio-sdk/archive/0fecdd0030b8cefe471b574deed3ca19b64ff323.zip" [[package]] name = "launchdarkly-server-sdk" @@ -5128,4 +5128,4 @@ uwsgi = ["pyuwsgi", "uwsgitop"] [metadata] lock-version = "2.1" python-versions = ">=3.10,<4" -content-hash = "a93bf31473c2cbe802f22cc74e23da12d7c9ac24a3b204ed1b83c49ad6433632" +content-hash = "0c64dc985804e454694a651c4c167e1bb22ff47ea123d24fd46f2e8008af8a73" diff --git a/pyproject.toml b/pyproject.toml index 97fca0c30af9..dd13638a2263 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -209,7 +209,7 @@ djangorestframework-simplejwt = {extras = ["crypto"], version = "^5.4.0"} tldextract = ">=5.1.3" # Humansignal repo dependencies -label-studio-sdk = {url = "https://github.com/HumanSignal/label-studio-sdk/archive/324323c4e50581f25d4aedc7c42922e01a330d7c.zip"} +label-studio-sdk = {url = "https://github.com/HumanSignal/label-studio-sdk/archive/0fecdd0030b8cefe471b574deed3ca19b64ff323.zip"} [tool.poetry.group.test.dependencies] pytest = "7.2.2"