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

feat: Support response_format and structured JSON responses. #3785

Open
1 task done
Tracked by #1151
actow opened this issue Jun 24, 2024 · 2 comments
Open
1 task done
Tracked by #1151

feat: Support response_format and structured JSON responses. #3785

actow opened this issue Jun 24, 2024 · 2 comments
Assignees
Labels
category: model settings Inference params, presets, templates category: providers Local & remote inference providers move to Cortex type: feature request A new feature

Comments

@actow
Copy link

actow commented Jun 24, 2024

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

There is not a away to force the model to return structured json at the API level.

Describe the solution

The response_format parameter is supported by certain models, such as Groq's llama3 (8b & 70b), Fireworks AI's llama3 70b and OpenAI gpt 3.5 and 4 etc.

https://console.groq.com/docs/api-reference#chat-create
https://platform.openai.com/docs/api-reference/audio/createSpeech#audio-createspeech-response_format
https://readme.fireworks.ai/docs/structured-response-formatting

If will be great if Jan provide a UI to set that.

Teachability, documentation, adoption, migration strategy

https://console.groq.com/docs/api-reference#chat-create
https://platform.openai.com/docs/api-reference/audio/createSpeech#audio-createspeech-response_format
https://readme.fireworks.ai/docs/structured-response-formatting

What is the motivation / use case for changing the behavior?

The JSON structure response is very useful to experiment the models' capability to extend beyond a normal chat bot.

@actow actow added the type: feature request A new feature label Jun 24, 2024
@imtuyethan imtuyethan self-assigned this Jul 2, 2024
@imtuyethan imtuyethan removed their assignment Aug 28, 2024
@imtuyethan imtuyethan transferred this issue from janhq/jan Sep 2, 2024
@0xSage 0xSage added the category: app shell Installation, updater, global application issues label Sep 6, 2024
@dan-homebrew
Copy link
Contributor

@nguyenhoangthuan99 I'm marking this for Sprint 20, but it's possible that this is not a simple upstream of llama.cpp capability.

  • Can you take a look and assess
  • If it's too big, we will postpone to Sprint 21

@dan-homebrew
Copy link
Contributor

Also: linked to janhq/cortex.cpp#295?

@gabrielle-ong gabrielle-ong transferred this issue from janhq/cortex.cpp Oct 13, 2024
@gabrielle-ong gabrielle-ong added the category: providers Local & remote inference providers label Oct 13, 2024
@gabrielle-ong gabrielle-ong moved this from Icebox to Investigating in Jan & Cortex Oct 13, 2024
@0xSage 0xSage added category: model settings Inference params, presets, templates and removed category: app shell Installation, updater, global application issues labels Oct 15, 2024
@0xSage 0xSage moved this from Investigating to Planning in Jan & Cortex Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: model settings Inference params, presets, templates category: providers Local & remote inference providers move to Cortex type: feature request A new feature
Projects
Status: Planning
Development

No branches or pull requests

7 participants