Skip to content
New issue

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

<|python_tag|> for JSON output #266

Open
mmoskal opened this issue Jan 16, 2025 · 0 comments
Open

<|python_tag|> for JSON output #266

mmoskal opened this issue Jan 16, 2025 · 0 comments

Comments

@mmoskal
Copy link

mmoskal commented Jan 16, 2025

Docs in this repo say that when using custom tool calling with JSON one should use Environment: ipython and expect <|python_tag|>{ "type": "function", "name": ...

Docs on the website say you should not use Environment: ipython and expect just plain text, without "type":"function" (ie. just {"name": "...", "parameters": ...})

Unconstrained llama 3.1 70B, with Environment: ipython outputs according to the repo docs. However, 3.3 70B outputs something like <|python_tag|>get_weather(location=...).

I'm trying to implement tool calling with OpenAI-compatible interface and need to know how to prompt the model and what to expect in answer. Note that I have a fancy constraint engine so I can actually force the model to output JSON (with the right schema) after <|python_tag|>, but I would rather avoid going off-distribution.

This is relevant for llama models hosted in Azure.

cc @datdo-msft @tot0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant