Use Anthropic messages API (#304)

This commit is contained in:
Jani Monoses
2024-03-22 22:23:31 +02:00
committed by GitHub
parent 08df63a6f8
commit e57f079275
6 changed files with 25 additions and 19 deletions

View File

@@ -73,7 +73,7 @@ class SglSamplingParams:
"Regular expression is not supported in the Anthropic backend."
)
return {
"max_tokens_to_sample": self.max_new_tokens,
"max_tokens": self.max_new_tokens,
"stop_sequences": (
self.stop if isinstance(self.stop, (list, tuple)) else [self.stop]
),