Skip to content

feat: Support response_format and structured JSON responses. #3785

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

Closed
1 task done
Tracked by #1151
actow opened this issue Jun 24, 2024 · 2 comments · Fixed by menloresearch/cortex.llamacpp#308 or menloresearch/cortex.cpp#1749
Closed
1 task done
Tracked by #1151
Assignees
Labels
category: model settings Inference params, presets, templates category: providers Local & remote inference providers Cortex-related 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 menloresearch/jan Sep 2, 2024
@freelerobot freelerobot added the category: app shell Installation, updater, global application issues label Sep 6, 2024
@dan-menlo
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-menlo
Copy link
Contributor

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

@gabrielle-ong gabrielle-ong transferred this issue from menloresearch/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 Menlo Oct 13, 2024
@freelerobot freelerobot added category: model settings Inference params, presets, templates and removed category: app shell Installation, updater, global application issues labels Oct 15, 2024
@freelerobot freelerobot moved this from Investigating to Planning in Menlo Oct 15, 2024
@nguyenhoangthuan99 nguyenhoangthuan99 moved this from Planning to In Progress in Menlo Nov 29, 2024
@imtuyethan imtuyethan moved this from In Progress to In Review in Menlo Nov 29, 2024
@github-project-automation github-project-automation bot moved this from In Review to Review + QA in Menlo Dec 1, 2024
@imtuyethan imtuyethan moved this from QA to Completed in Menlo Dec 3, 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 Cortex-related type: feature request A new feature
Projects
Archived in project
7 participants