mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-13 18:12:14 +02:00
Fix LLM API key (#4623)
* Fix LLM API key * Remove unused import * Update web/src/app/admin/configuration/llm/LLMProviderUpdateForm.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
@@ -70,7 +70,7 @@ def test_llm_configuration(
|
||||
name=test_llm_request.name, db_session=db_session
|
||||
)
|
||||
# if an API key is not provided, use the existing provider's API key
|
||||
if existing_provider and test_api_key is None:
|
||||
if existing_provider and not test_llm_request.api_key_changed:
|
||||
test_api_key = existing_provider.api_key
|
||||
|
||||
# For this "testing" workflow, we do *not* need the actual `max_input_tokens`.
|
||||
|
@@ -28,7 +28,10 @@ class TestLLMRequest(BaseModel):
|
||||
fast_default_model_name: str | None = None
|
||||
deployment_name: str | None = None
|
||||
|
||||
model_configurations: list["ModelConfigurationUpsertRequest"] = []
|
||||
model_configurations: list["ModelConfigurationUpsertRequest"]
|
||||
|
||||
# if try and use the existing API key
|
||||
api_key_changed: bool
|
||||
|
||||
|
||||
class LLMProviderDescriptor(BaseModel):
|
||||
|
Reference in New Issue
Block a user