Improve AI service to better estimate token completion for responses
Update `server/aiService.ts` to use `max_completion_tokens` instead of `max_tokens` for more accurate AI response length estimation. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 170e18f0-0f13-4eca-8643-546bba1dd8cc Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/170e18f0-0f13-4eca-8643-546bba1dd8cc/td5Y4HG
This commit is contained in:
parent
475534134c
commit
9202e323bc
BIN
attached_assets/image_1756817997778.png
Normal file
BIN
attached_assets/image_1756817997778.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
@ -56,7 +56,7 @@ Odgovori samo z opisom, brez dodatnih pojasnil.`;
|
||||
content: prompt
|
||||
}
|
||||
],
|
||||
max_tokens: Math.ceil(maxCharacters / 2), // Rough estimate: 2 characters per token
|
||||
max_completion_tokens: Math.ceil(maxCharacters / 2), // Rough estimate: 2 characters per token
|
||||
temperature: 0.7,
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user