Skip to content

Commit

Permalink
Fikser tilgang
Browse files Browse the repository at this point in the history
  • Loading branch information
haakoaho committed Nov 22, 2023
1 parent b6fc68b commit 2943f45
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const EXPORT_MESSAGE_CLASS_NAME = "export-markdown";
export enum ServiceProvider {
OpenAI = "OpenAI",
Azure = "Azure",
Variant = "Variant",
}

export const OpenaiPath = {
Expand Down
10 changes: 7 additions & 3 deletions app/store/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ const DEFAULT_ACCESS_STATE = {
accessCode: "",
useCustomConfig: false,

provider: ServiceProvider.Azure,
provider: ServiceProvider.Variant,

// openai
openaiUrl: DEFAULT_OPENAI_URL,
openaiApiKey: "",

// azure
azureUrl: process.env.AZURE_OPENAI_API_BASE ?? "",
azureApiKey: process.env.AZURE_API_KEY ?? "",
azureUrl: "",
azureApiKey: "",
azureApiVersion: "2023-08-01-preview",

// server config
Expand All @@ -53,6 +53,10 @@ export const useAccessStore = createPersistStore(
},

isValidAzure() {
const test = ensure(get(), ["azureUrl", "azureApiKey", "azureApiVersion"])
? "Ja dette er veldig riktig"
: "nei dette ble feil";
console.log(get().azureUrl);
return ensure(get(), ["azureUrl", "azureApiKey", "azureApiVersion"]);
},

Expand Down
2 changes: 1 addition & 1 deletion app/store/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const DEFAULT_CONFIG = {
models: DEFAULT_MODELS as any as LLMModel[],

modelConfig: {
model: "gpt-3.5-turbo" as ModelType,
model: "variant-rocks" as ModelType,
temperature: 0.5,
top_p: 1,
max_tokens: 4000,
Expand Down

0 comments on commit 2943f45

Please sign in to comment.