fix: increase maxTokens limits to reduce truncation failures
Default 200→400, invention 300→600, desireGeneration 500→800, backstoryAndDesires 800→1200. Can trim back once we have usage data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,7 @@ describe('llmConfig', () => {
|
||||
const config = getLlmConfig();
|
||||
expect(config.model).toBe('');
|
||||
expect(config.fallbackModel).toBeNull();
|
||||
expect(config.maxTokens).toBe(200);
|
||||
expect(config.maxTokens).toBe(400);
|
||||
expect(config.temperature).toBe(0.8);
|
||||
expect(config.requestsPerMinute).toBe(20);
|
||||
expect(config.timeoutMs).toBe(15000);
|
||||
|
||||
@@ -15,7 +15,7 @@ export function getLlmConfig(): LlmConfig {
|
||||
apiKey,
|
||||
model: process.env.LLM_MODEL ?? '',
|
||||
fallbackModel: process.env.LLM_FALLBACK_MODEL ?? null,
|
||||
maxTokens: 200,
|
||||
maxTokens: 400,
|
||||
temperature: 0.8,
|
||||
requestsPerMinute: 20,
|
||||
timeoutMs: 15000,
|
||||
|
||||
@@ -42,7 +42,7 @@ export const templates: Record<string, PromptTemplate> = {
|
||||
|
||||
invention: {
|
||||
name: 'invention',
|
||||
maxTokens: 300,
|
||||
maxTokens: 600,
|
||||
jsonResponse: true,
|
||||
systemPrompt:
|
||||
'Given available materials and a settler\'s stats, consider 3 possible inventions, ' +
|
||||
@@ -69,7 +69,7 @@ export const templates: Record<string, PromptTemplate> = {
|
||||
|
||||
backstoryAndDesires: {
|
||||
name: 'backstoryAndDesires',
|
||||
maxTokens: 800,
|
||||
maxTokens: 1200,
|
||||
jsonResponse: true,
|
||||
systemPrompt:
|
||||
'Write a brief backstory (1-2 sentences) and 1-2 initial desires for this settler. ' +
|
||||
@@ -92,7 +92,7 @@ export const templates: Record<string, PromptTemplate> = {
|
||||
|
||||
desireGeneration: {
|
||||
name: 'desireGeneration',
|
||||
maxTokens: 500,
|
||||
maxTokens: 800,
|
||||
jsonResponse: true,
|
||||
systemPrompt:
|
||||
'Generate a new personal desire for this settler based on their personality and recent experiences.',
|
||||
|
||||
Reference in New Issue
Block a user