Use DEFAULT_MODEL constant for Anthropic API calls
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Called when form_filler hits a question it can't answer from profile/answers.json
|
||||
*/
|
||||
import { readFileSync, existsSync } from 'fs';
|
||||
import { ANTHROPIC_API_URL } from './constants.mjs';
|
||||
import { ANTHROPIC_API_URL, DEFAULT_MODEL } from './constants.mjs';
|
||||
|
||||
/**
|
||||
* Generate an answer to an unknown application question using Claude.
|
||||
@@ -69,7 +69,7 @@ Write the best answer for this question. Just the answer text -- no preamble, no
|
||||
'anthropic-version': '2023-06-01',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
model: 'claude-sonnet-4-6-20251101',
|
||||
model: DEFAULT_MODEL,
|
||||
max_tokens: 512,
|
||||
system: systemPrompt,
|
||||
messages: [{ role: 'user', content: userPrompt }],
|
||||
|
||||
@@ -62,6 +62,7 @@ export const ANTHROPIC_API_URL = 'https://api.anthropic.com/v1/messages';
|
||||
export const ANTHROPIC_BATCH_API_URL = 'https://api.anthropic.com/v1/messages/batches';
|
||||
export const FILTER_DESC_MAX_CHARS = 800;
|
||||
export const FILTER_BATCH_MAX_TOKENS = 1024;
|
||||
export const DEFAULT_MODEL = 'claude-sonnet-4-6';
|
||||
export const DEFAULT_FILTER_MODEL = 'claude-sonnet-4-6-20251101';
|
||||
export const DEFAULT_FILTER_MIN_SCORE = 5;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
DEFAULT_YEARS_EXPERIENCE, DEFAULT_DESIRED_SALARY,
|
||||
MINIMUM_SALARY_FACTOR, DEFAULT_SKILL_RATING,
|
||||
LINKEDIN_EASY_APPLY_MODAL_SELECTOR, FORM_PATTERN_MAX_LENGTH,
|
||||
AUTOCOMPLETE_WAIT, AUTOCOMPLETE_TIMEOUT, ANTHROPIC_API_URL
|
||||
AUTOCOMPLETE_WAIT, AUTOCOMPLETE_TIMEOUT, ANTHROPIC_API_URL, DEFAULT_MODEL
|
||||
} from './constants.mjs';
|
||||
|
||||
/**
|
||||
@@ -284,7 +284,7 @@ Answer:`;
|
||||
'anthropic-version': '2023-06-01',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
model: 'claude-sonnet-4-6-20251101',
|
||||
model: DEFAULT_MODEL,
|
||||
max_tokens: 256,
|
||||
system: systemPrompt,
|
||||
messages: [{ role: 'user', content: userPrompt }],
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* One Claude call per search track using full profile + search config context
|
||||
*/
|
||||
|
||||
import { ANTHROPIC_API_URL } from './constants.mjs';
|
||||
import { ANTHROPIC_API_URL, DEFAULT_MODEL } from './constants.mjs';
|
||||
|
||||
export async function generateKeywords(search, profile, apiKey) {
|
||||
if (!apiKey) throw new Error('ANTHROPIC_API_KEY not set');
|
||||
@@ -48,7 +48,7 @@ Example format: ["query one", "query two", "query three"]`;
|
||||
'anthropic-version': '2023-06-01'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
model: 'claude-sonnet-4-6-20251101',
|
||||
model: DEFAULT_MODEL,
|
||||
max_tokens: 1024,
|
||||
messages: [{ role: 'user', content: prompt }]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user