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()
|
llmEnsureEncKey()
|
||||||
|
|
||||||
existing, err := llmprovider.Global.Get(key)
|
existing, err := llmprovider.Global.Get(key, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
respondError(c, http.StatusNotFound, fmt.Sprintf("provider \"%s\" not found", key))
|
respondError(c, http.StatusNotFound, fmt.Sprintf("provider \"%s\" not found", key))
|
||||||
return
|
return
|
||||||
|
|
@ -633,7 +633,7 @@ func handleLLMProviderTest(c *gin.Context) {
|
||||||
|
|
||||||
llmEnsureEncKey()
|
llmEnsureEncKey()
|
||||||
|
|
||||||
p, err := llmprovider.Global.Get(key)
|
p, err := llmprovider.Global.Get(key, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
respondError(c, http.StatusNotFound, fmt.Sprintf("provider \"%s\" not found", key))
|
respondError(c, http.StatusNotFound, fmt.Sprintf("provider \"%s\" not found", key))
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue