Skip the prompt_cache_key parameter for GroqAPI's to allow Groq API's to work
This commit is contained in:
parent
41bb78f593
commit
005611f997
1 changed files with 2 additions and 1 deletions
|
|
@ -157,7 +157,8 @@ func (p *Provider) Chat(
|
|||
// Prompt caching is only supported by OpenAI-native endpoints.
|
||||
// Gemini and other providers reject unknown fields, so skip for non-OpenAI APIs.
|
||||
if cacheKey, ok := options["prompt_cache_key"].(string); ok && cacheKey != "" {
|
||||
if !strings.Contains(p.apiBase, "generativelanguage.googleapis.com") {
|
||||
if !strings.Contains(p.apiBase, "generativelanguage.googleapis.com") &&
|
||||
!strings.Contains(p.apiBase, "api.groq.com") {
|
||||
requestBody["prompt_cache_key"] = cacheKey
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue