mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-14 04:55:27 +00:00
feat: more llm provider options (google, mistral) (#28)
* feat: add google provider * fix: default for google model * feat: multiple providers * fix: defaults from env for login form * fix: add mistral to env files * chore: delete unused code * chore: revert database url to original * fix: render default value for api key from env on server * fix: type errors during compilation --------- Co-authored-by: Vasily Zubarev <me@vas3k.ru>
This commit is contained in:
@@ -13,11 +13,20 @@ export async function selfHostedGetStartedAction(formData: FormData) {
|
||||
await createUserDefaults(user.id)
|
||||
}
|
||||
|
||||
const openaiApiKey = formData.get("openai_api_key")
|
||||
if (openaiApiKey) {
|
||||
await updateSettings(user.id, "openai_api_key", openaiApiKey as string)
|
||||
const apiKeys = [
|
||||
"openai_api_key",
|
||||
"google_api_key",
|
||||
"mistral_api_key"
|
||||
]
|
||||
|
||||
for (const key of apiKeys) {
|
||||
const value = formData.get(key)
|
||||
if (value) {
|
||||
await updateSettings(user.id, key, value as string)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const defaultCurrency = formData.get("default_currency")
|
||||
if (defaultCurrency) {
|
||||
await updateSettings(user.id, "default_currency", defaultCurrency as string)
|
||||
|
||||
Reference in New Issue
Block a user