fix(llm): update LLM provider retrieval to include optional parameter
- Modified the LLM provider retrieval functions to include an optional parameter for enhanced functionality. - Updated the handleLLMProviderUpdate and handleLLMProviderTest functions to reflect this change, improving error handling and provider management.
This commit is contained in:
parent
6f78f6066b
commit
aa9632d67c
1 changed files with 2 additions and 2 deletions
|
|
@ -469,7 +469,7 @@ func handleLLMProviderUpdate(c *gin.Context) {
|
|||
|
||||
llmEnsureEncKey()
|
||||
|
||||
existing, err := llmprovider.Global.Get(key)
|
||||
existing, err := llmprovider.Global.Get(key, true)
|
||||
if err != nil {
|
||||
respondError(c, http.StatusNotFound, fmt.Sprintf("provider \"%s\" not found", key))
|
||||
return
|
||||
|
|
@ -633,7 +633,7 @@ func handleLLMProviderTest(c *gin.Context) {
|
|||
|
||||
llmEnsureEncKey()
|
||||
|
||||
p, err := llmprovider.Global.Get(key)
|
||||
p, err := llmprovider.Global.Get(key, true)
|
||||
if err != nil {
|
||||
respondError(c, http.StatusNotFound, fmt.Sprintf("provider \"%s\" not found", key))
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue