vercel / modelfusion

The TypeScript library for building AI applications.
https://modelfusion.dev
MIT License
1.16k stars 82 forks source link

Update docs to include `response_format` for OpenAI ChatTextGenerator; `responseFormat` is supported but not documented #339

Open mrprkr opened 6 months ago

mrprkr commented 6 months ago

type OpenAIChatSettings is missing option for response_format

Example:

      .ChatTextGenerator({
        model: 'gpt-4-vision-preview',
        maxGenerationTokens: 2048,
        temperature: 0,
        response_format: { type: "json_object" },
      })
      .withInstructionPrompt(),
mrprkr commented 6 months ago

adding responseFormat is only supported on gpt-4, which throws an error expected an object but received string on vision prompts