Skip to content

Commit dd96c31

Browse files
authored
Merge branch 'main' into templated-inference-python-snippets
2 parents d2579ab + bae2997 commit dd96c31

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/inference/src/providers/black-forest-labs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
import type { ProviderConfig, UrlParams, HeaderParams, BodyParams } from "../types";
1818

19-
const BLACK_FOREST_LABS_AI_API_BASE_URL = "https://api.us1.bfl.ai/v1";
19+
const BLACK_FOREST_LABS_AI_API_BASE_URL = "https://api.us1.bfl.ai";
2020

2121
const makeBody = (params: BodyParams): Record<string, unknown> => {
2222
return params.args;
@@ -31,7 +31,7 @@ const makeHeaders = (params: HeaderParams): Record<string, string> => {
3131
};
3232

3333
const makeUrl = (params: UrlParams): string => {
34-
return `${params.baseUrl}/${params.model}`;
34+
return `${params.baseUrl}/v1/${params.model}`;
3535
};
3636

3737
export const BLACK_FOREST_LABS_CONFIG: ProviderConfig = {

packages/inference/src/providers/fireworks-ai.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
import type { ProviderConfig, UrlParams, HeaderParams, BodyParams } from "../types";
1818

19-
const FIREWORKS_AI_API_BASE_URL = "https://api.fireworks.ai/inference";
19+
const FIREWORKS_AI_API_BASE_URL = "https://api.fireworks.ai";
2020

2121
const makeBody = (params: BodyParams): Record<string, unknown> => {
2222
return {
@@ -31,9 +31,9 @@ const makeHeaders = (params: HeaderParams): Record<string, string> => {
3131

3232
const makeUrl = (params: UrlParams): string => {
3333
if (params.task === "text-generation" && params.chatCompletion) {
34-
return `${params.baseUrl}/v1/chat/completions`;
34+
return `${params.baseUrl}/inference/v1/chat/completions`;
3535
}
36-
return params.baseUrl;
36+
return `${params.baseUrl}/inference`;
3737
};
3838

3939
export const FIREWORKS_AI_CONFIG: ProviderConfig = {

0 commit comments

Comments
 (0)