neferdata / allms

allms: One Rust Library to rule them aLLMs
https://crates.io/crates/allms
Other
46 stars 6 forks source link

Open AI response mode JSON #6

Open VaibhavSinghWefox opened 11 months ago

VaibhavSinghWefox commented 11 months ago

With openai introducing the response format json in the chat completions api, do you think this library can benefit from this feature?

kamillitman commented 11 months ago

Great suggestion! We will add it in the near future.

In the meantime you should be safe using the crate as-is as the json output format is already ensured through prompt engineering. Adding it in the api call will only reinforce the expectations but won't make the existing implementation obsolete either as the documentation currently reads:

Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message.