vercel / modelfusion

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

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

Open mrprkr opened 4 months ago

mrprkr commented 4 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 4 months ago

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