Skip to content

Commit

Permalink
update claude model max_tokens setting
Browse files Browse the repository at this point in the history
  • Loading branch information
shuang committed Dec 16, 2024
1 parent b9749fd commit e84bfe7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gptbioinsightor/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def anthropic_client(msgs, model, apikey, sys_prompt=''):
api_key=apikey
)
sys_prompt = '' if sys_prompt is None else sys_prompt
max_tokens = 8192 if model == 'claude-3-5-sonnet-20240620' else 4096
if model in ["claude-3-5-sonnet-20241022", "claude-3-5-sonnet-20240620", "claude-3-5-haiku-20241022"]:
max_tokens = 8192
else:
max_tokens = 4096
response = client.messages.create(
model=model,
system=sys_prompt,
Expand Down

0 comments on commit e84bfe7

Please sign in to comment.