brainlid / langchain

Elixir implementation of a LangChain style framework.
https://hexdocs.pm/langchain/
Other
510 stars 58 forks source link

Adds support for JSON mode in OpenAI Chat model #34

Closed chrisgreg closed 8 months ago

chrisgreg commented 8 months ago

The new update to OpenAI ChatGPT APIs allow users to specify if they want their response to be in JSON or not (defaults to text).

This allows Langchain to specify the response type as valid JSON or not.

https://platform.openai.com/docs/api-reference/chat/create#chat-create-response_format

brainlid commented 8 months ago

This looks good! Thanks for the doc link and the submission.

❤️💛💙💜