-
Notifications
You must be signed in to change notification settings - Fork 323
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
bug: request json not same with python api #326
Comments
Hey! Thanks for this issue. We actually have proper deepseek support via our let deepseek_client = deepseek::Client::from_env();
let sentiment_classifier = deepseek_client
.extractor::<SentimentClassification>("xxxx")
.build();
let text = "I like this house, it is awsome!";
match sentiment_classifier.extract(text).await {
Ok(result) => pretty_print_result(text, &result),
Err(e) => eprintln!("Got wrong answer: {}", e),
} Even though deepseek and other providers say they accept openai compatible format, we've now learned that they only accept a subset of the actual format. We might adjust our openai client a bit to serialize in a similar manner but it's kinda an odd. |
I deploy deepseek with mistral, it only response with openai format. I tried with deepseek provider, but it failed to parse response. I also looked openai document, the example for default and stream also use string for content and only use dict with type for image. So I think it's better to support the same :) |
By the way, it's better to have debug output about request json before send and response text before serialization since it might failed in somes cases. That will save us time for debugging. |
That's a good point. I think we can really reform our debugging and tracing
calls to be much more useful in these situations, very useful feedback!
…On Thu, Feb 27, 2025, 9:51 PM jamesvren ***@***.***> wrote:
By the way, it's better to have debug output about request json before
send and response text before serialization since it might failed in somes
cases. That will save us time for debugging.
—
Reply to this email directly, view it on GitHub
<#326 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYUKJZYNBXR3O4MFGJV3MET2R7TOHAVCNFSM6AAAAABYAIGJYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBZG4YTINBTGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
[image: jamesvren]*jamesvren* left a comment (0xPlaygrounds/rig#326)
<#326 (comment)>
By the way, it's better to have debug output about request json before
send and response text before serialization since it might failed in somes
cases. That will save us time for debugging.
—
Reply to this email directly, view it on GitHub
<#326 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYUKJZYNBXR3O4MFGJV3MET2R7TOHAVCNFSM6AAAAABYAIGJYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBZG4YTINBTGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Bug Report
The request json are not same with what python openai send. This cause my local deepseek think it missing some items and donnot chat.
Reproduction
Expected behavior
I expect it send the same request like python openai
Screenshots
This is what rig send (Please note that messages content are not string)
It will give me the following error:
This is waht python openai send (which is my expect)
Additional context
The text was updated successfully, but these errors were encountered: