( options: LanguageModel.ProviderOptions, config: Config.Service )
| 1433 | } |
| 1434 | |
| 1435 | const prepareResponseFormat = ( |
| 1436 | options: LanguageModel.ProviderOptions, |
| 1437 | config: Config.Service |
| 1438 | ): typeof Generated.TextResponseFormatConfiguration.Encoded => { |
| 1439 | if (options.responseFormat.type === "json") { |
| 1440 | const name = options.responseFormat.objectName |
| 1441 | const schema = options.responseFormat.schema |
| 1442 | return { |
| 1443 | type: "json_schema", |
| 1444 | name, |
| 1445 | description: Tool.getDescriptionFromSchemaAst(schema.ast) ?? "Response with a JSON object", |
| 1446 | schema: Tool.getJsonSchemaFromSchemaAst(schema.ast) as any, |
| 1447 | strict: config.strict ?? true |
| 1448 | } |
| 1449 | } |
| 1450 | return { type: "text" } |
| 1451 | } |
no outgoing calls
no test coverage detected