Skip to content

Commit

Permalink
fix: Change base_url to full_url
Browse files Browse the repository at this point in the history
  • Loading branch information
hiro-v committed Dec 8, 2023
1 parent b939692 commit f9e73b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion extensions/inference-openai-extension/src/helpers/sse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion extensions/inference-openai-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>",
};

Expand Down

0 comments on commit f9e73b0

Please sign in to comment.