Skip to content

Commit 6dd3ae0

Browse files
committed
fix: make single step forcing optional on cohere endpoint type
1 parent 71aae58 commit 6dd3ae0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/server/endpoints/cohere/endpointCohere.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ export const endpointCohereParametersSchema = z.object({
1515
apiKey: z.string().default(env.COHERE_API_TOKEN),
1616
clientName: z.string().optional(),
1717
raw: z.boolean().default(false),
18+
forceSingleStep: z.boolean().default(true),
1819
});
1920

2021
export async function endpointCohere(
2122
input: z.input<typeof endpointCohereParametersSchema>
2223
): Promise<Endpoint> {
23-
const { apiKey, clientName, model, raw } = endpointCohereParametersSchema.parse(input);
24+
const { apiKey, clientName, model, raw, forceSingleStep } =
25+
endpointCohereParametersSchema.parse(input);
2426

2527
let cohere: CohereClient;
2628

@@ -62,7 +64,7 @@ export async function endpointCohere(
6264
});
6365

6466
stream = await cohere.chatStream({
65-
forceSingleStep: true,
67+
forceSingleStep,
6668
message: prompt,
6769
rawPrompting: true,
6870
model: model.id ?? model.name,

0 commit comments

Comments
 (0)