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 interface EngineSettings {
|
||||
base_url?: string;
|
||||
full_url?: string;
|
||||
api_key?: string;
|
||||
}
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ export function requestInference(
|
||||
// Model parameters spreading
|
||||
...model.parameters,
|
||||
});
|
||||
fetch(`${engine.base_url}/chat/completions`, {
|
||||
fetch(`${engine.full_url}`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@ -37,7 +37,7 @@ export default class JanInferenceOpenAIExtension implements InferenceExtension {
|
||||
private static _currentModel: OpenAIModel;
|
||||
|
||||
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>",
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user