diff --git a/src/lib/server/endpoints/cohere/endpointCohere.ts b/src/lib/server/endpoints/cohere/endpointCohere.ts index 45076d70af3..aa15b75eb42 100644 --- a/src/lib/server/endpoints/cohere/endpointCohere.ts +++ b/src/lib/server/endpoints/cohere/endpointCohere.ts @@ -15,12 +15,14 @@ export const endpointCohereParametersSchema = z.object({ apiKey: z.string().default(env.COHERE_API_TOKEN), clientName: z.string().optional(), raw: z.boolean().default(false), + forceSingleStep: z.boolean().default(true), }); export async function endpointCohere( input: z.input ): Promise { - const { apiKey, clientName, model, raw } = endpointCohereParametersSchema.parse(input); + const { apiKey, clientName, model, raw, forceSingleStep } = + endpointCohereParametersSchema.parse(input); let cohere: CohereClient; @@ -62,7 +64,7 @@ export async function endpointCohere( }); stream = await cohere.chatStream({ - forceSingleStep: true, + forceSingleStep, message: prompt, rawPrompting: true, model: model.id ?? model.name,