mirror of
https://github.com/sune-org/ORP.git
synced 2026-01-13 16:17:59 +00:00
Fix: Explicitly set includeThoughts for Google provider
This commit is contained in:
2
index.js
2
index.js
@@ -265,7 +265,7 @@ export class MyDurableObject {
|
||||
|
||||
async streamGoogle({ apiKey, body }) {
|
||||
const generationConfig = Object.entries({ temperature: body.temperature, topP: body.top_p, maxOutputTokens: body.max_tokens }).reduce((acc, [k, v]) => (Number.isFinite(+v) && +v >= 0 ? { ...acc, [k]: +v } : acc), {});
|
||||
if (body.reasoning?.exclude !== true) generationConfig.thinkingConfig = { includeThoughts: true };
|
||||
if (body.reasoning) generationConfig.thinkingConfig = { includeThoughts: body.reasoning.exclude !== true };
|
||||
if (body.response_format?.type?.startsWith('json')) {
|
||||
generationConfig.responseMimeType = 'application/json';
|
||||
if (body.response_format.json_schema) {
|
||||
|
||||
Reference in New Issue
Block a user