mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
AIX: fix Gemini with JSON outputs
This commit is contained in:
@@ -123,7 +123,7 @@ export const anthropicWireMessageCreateSchema = z.object({
|
||||
]).optional(),
|
||||
|
||||
/**
|
||||
*
|
||||
* (optional) Tools that the model can use to generate the response.
|
||||
*/
|
||||
tools: z.array(anthropicWire_ToolUL_Schema).optional(),
|
||||
|
||||
|
||||
@@ -176,8 +176,15 @@ const geminiSafetySettingSchema = z.object({
|
||||
threshold: geminiBlockSafetyLevelEnum,
|
||||
});
|
||||
|
||||
const geminiResponseMimeTypeEnum = z.enum([
|
||||
'text/plain',
|
||||
'application/json',
|
||||
]);
|
||||
|
||||
const geminiGenerationConfigSchema = z.object({
|
||||
stopSequences: z.array(z.string()).optional(),
|
||||
responseMimeType: geminiResponseMimeTypeEnum.optional(), // defaults to 'text/plain'
|
||||
responseSchema: z.record(z.any()).optional(), // This is a simplified representation of the Schema object
|
||||
candidateCount: z.number().int().optional(),
|
||||
maxOutputTokens: z.number().int().optional(),
|
||||
temperature: z.number().optional(),
|
||||
|
||||
Reference in New Issue
Block a user