fix: Change base_url to full_url
This commit is contained in:
parent
b939692187
commit
f9e73b0bbd
@ -3,7 +3,7 @@ import { Model } from "@janhq/core";
|
|||||||
declare const MODULE: string;
|
declare const MODULE: string;
|
||||||
|
|
||||||
declare interface EngineSettings {
|
declare interface EngineSettings {
|
||||||
base_url?: string;
|
full_url?: string;
|
||||||
api_key?: string;
|
api_key?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export function requestInference(
|
|||||||
// Model parameters spreading
|
// Model parameters spreading
|
||||||
...model.parameters,
|
...model.parameters,
|
||||||
});
|
});
|
||||||
fetch(`${engine.base_url}/chat/completions`, {
|
fetch(`${engine.full_url}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@ -37,7 +37,7 @@ export default class JanInferenceOpenAIExtension implements InferenceExtension {
|
|||||||
private static _currentModel: OpenAIModel;
|
private static _currentModel: OpenAIModel;
|
||||||
|
|
||||||
private static _engineSettings: EngineSettings = {
|
private static _engineSettings: EngineSettings = {
|
||||||
base_url: "https://api.openai.com/v1",
|
full_url: "https://api.openai.com/v1/chat/completion",
|
||||||
api_key: "sk-<your key here>",
|
api_key: "sk-<your key here>",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user