groq add responses capability (#3029)

Co-authored-by: 澄潭 <zty98751@alibaba-inc.com>
This commit is contained in:
victorserbu2709
2025-11-11 13:36:26 +02:00
committed by GitHub
parent d1998804c6
commit 1300e09e28

View File

@@ -6,14 +6,15 @@ import (
"strings" "strings"
"github.com/alibaba/higress/plugins/wasm-go/extensions/ai-proxy/util" "github.com/alibaba/higress/plugins/wasm-go/extensions/ai-proxy/util"
"github.com/higress-group/wasm-go/pkg/wrapper"
"github.com/higress-group/proxy-wasm-go-sdk/proxywasm/types" "github.com/higress-group/proxy-wasm-go-sdk/proxywasm/types"
"github.com/higress-group/wasm-go/pkg/wrapper"
) )
// groqProvider is the provider for Groq service. // groqProvider is the provider for Groq service.
const ( const (
groqDomain = "api.groq.com" groqDomain = "api.groq.com"
groqChatCompletionPath = "/openai/v1/chat/completions" groqChatCompletionPath = "/openai/v1/chat/completions"
groqResponsesPath = "/openai/v1/responses"
) )
type groqProviderInitializer struct{} type groqProviderInitializer struct{}
@@ -28,6 +29,7 @@ func (g *groqProviderInitializer) ValidateConfig(config *ProviderConfig) error {
func (g *groqProviderInitializer) DefaultCapabilities() map[string]string { func (g *groqProviderInitializer) DefaultCapabilities() map[string]string {
return map[string]string{ return map[string]string{
string(ApiNameChatCompletion): groqChatCompletionPath, string(ApiNameChatCompletion): groqChatCompletionPath,
string(ApiNameResponses): groqResponsesPath,
} }
} }