We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, refs are not supported in tool calling schemas.
It appears that text-generation-inference is dropping reference definitions before passing the schema to outlines-core to generate a regex.
text-generation-inference
outlines-core
text-generation-inference/router/src/infer/tool_grammar.rs
Lines 63 to 107 in 23bc38b
outlines-core does support JSON schemas with references.
Example API call with references:
% curl -X POST \ https://api-inference.huggingface.co/models/meta-llama/Llama-3.3-70B-Instruct/v1/chat/completions \ -H "Authorization: Bearer <key>" \ -H "Content-Type: application/json" \ -d '{ "messages": [{"role": "user", "content": "Call the function Response with some example inputs."}], "tools": [ { "type": "function", "function": { "name": "Response", "parameters": { "$defs": { "Source": { "properties": { "url": { "type": "string" } }, "type": "object" } }, "properties": { "sources": { "items": { "$ref": "#/$defs/Source" }, "type": "array" } }, "type": "object" } } } ] }' {"error":"Input validation error: cannot compile regex from schema: Invalid reference path: $defs","error_type":"validation"}
This feature is useful for calling complex functions.
Some other providers support schemas like this (e.g. OpenAI, Anthropic, MistralAI, etc.).
I can provide more examples and testing if helpful.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature request
Currently, refs are not supported in tool calling schemas.
It appears that
text-generation-inference
is dropping reference definitions before passing the schema tooutlines-core
to generate a regex.text-generation-inference/router/src/infer/tool_grammar.rs
Lines 63 to 107 in 23bc38b
outlines-core
does support JSON schemas with references.Example API call with references:
Motivation
This feature is useful for calling complex functions.
Some other providers support schemas like this (e.g. OpenAI, Anthropic, MistralAI, etc.).
Your contribution
I can provide more examples and testing if helpful.
The text was updated successfully, but these errors were encountered: