From e17b117363f381bcc6932d62950f62358eadde52 Mon Sep 17 00:00:00 2001 From: Phil Winder Date: Wed, 20 Nov 2024 14:15:26 +0000 Subject: [PATCH] fix(api): fix missing custom query parameters --- api/pkg/server/openai_chat_handlers.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/pkg/server/openai_chat_handlers.go b/api/pkg/server/openai_chat_handlers.go index f70609d7..ab5b6d5a 100644 --- a/api/pkg/server/openai_chat_handlers.go +++ b/api/pkg/server/openai_chat_handlers.go @@ -83,6 +83,15 @@ func (s *HelixAPIServer) createChatCompletion(rw http.ResponseWriter, r *http.Re AppID: r.URL.Query().Get("app_id"), AssistantID: r.URL.Query().Get("assistant_id"), RAGSourceID: r.URL.Query().Get("rag_source_id"), + QueryParams: func() map[string]string { + params := make(map[string]string) + for key, values := range r.URL.Query() { + if len(values) > 0 { + params[key] = values[0] + } + } + return params + }(), } if user.AppID != "" {