Merge pull request #1859 from xKevIsDev/groq-fix
fix: update Groq maxTokenAllowed calculation to enforce upper limit
This commit is contained in:
@@ -60,7 +60,7 @@ export default class GroqProvider extends BaseProvider {
|
|||||||
name: m.id,
|
name: m.id,
|
||||||
label: `${m.id} - context ${m.context_window ? Math.floor(m.context_window / 1000) + 'k' : 'N/A'} [ by ${m.owned_by}]`,
|
label: `${m.id} - context ${m.context_window ? Math.floor(m.context_window / 1000) + 'k' : 'N/A'} [ by ${m.owned_by}]`,
|
||||||
provider: this.name,
|
provider: this.name,
|
||||||
maxTokenAllowed: m.context_window || 8000,
|
maxTokenAllowed: Math.min(m.context_window || 8192, 16384),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user