fix anthropic context window

This commit is contained in:
Wlad Paiva
2023-10-31 15:52:14 -03:00
parent edb4fc89b5
commit 605d4e8afc
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'aibitat': patch
---
Trim anthropic response and add a bigger context window for the chat
+2 -2
View File
@@ -99,12 +99,12 @@ export class AnthropicProvider extends Provider<Anthropic> {
try {
const response = await this.client.completions.create({
model: this.model,
max_tokens_to_sample: 300,
max_tokens_to_sample: 3000,
stream: false,
prompt,
})
const result = response.completion
const result = response.completion.trim()
// TODO: get cost from response
const cost = 0