Skip to content

Commit 16ae575

Browse files
committed
fix
1 parent df783f8 commit 16ae575

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/inference/src/providers/novita.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ const makeHeaders = (params: HeaderParams): Record<string, string> => {
3232
const makeUrl = (params: UrlParams): string => {
3333
if (params.chatCompletion) {
3434
return `${params.baseUrl}/v3/openai/chat/completions`;
35-
}
36-
if (params.task === "text-generation") {
37-
}
35+
} else if (params.task === "text-generation") {
3836
return `${params.baseUrl}/v3/openai/completions`;
3937
} else if (params.task === "text-to-video") {
4038
return `${params.baseUrl}/v3/hf/${params.model}`;

packages/inference/src/snippets/python.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const snippetGenerator = (templateName: string, inputPreparationFn?: InputPrepar
112112
const inputs = inputPreparationFn ? inputPreparationFn(model, opts) : { inputs: getModelInputSnippet(model) };
113113
const request = makeRequestOptionsFromResolvedModel(
114114
providerModelId ?? model.id,
115-
{ accessToken: accessToken, model: providerModelId, provider: provider, ...inputs } as RequestArgs,
115+
{ accessToken: accessToken, provider: provider, ...inputs } as RequestArgs,
116116
{ chatCompletion: templateName.includes("conversational"), task: model.pipeline_tag as InferenceTask }
117117
);
118118

0 commit comments

Comments
 (0)