-
Notifications
You must be signed in to change notification settings - Fork 15.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiple: add stop
attribute
#22573
multiple: add stop
attribute
#22573
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
stop
attributestop
attribute
@@ -97,6 +99,8 @@ def _default_params(self) -> Mapping[str, Any]: | |||
"top_k_return": self.top_k_return, | |||
"n": self.n, | |||
} | |||
if self.stop: | |||
base_params["stop_sequences"] = self.stop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated but the check in L126 doesn't do anything, it couldn't be in kwargs
@@ -492,6 +492,9 @@ class Config: | |||
max_retries: int = 2 | |||
"""Number of retries allowed for requests sent to the Anthropic Completion API.""" | |||
|
|||
stop: Optional[List[str]] = Field(None, alias="stop_sequences") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make the attribute stop_sequences and the alias stop? since stop_sequences is the Anthropic name for it
@@ -35,6 +35,8 @@ class ChatAI21(BaseChatModel, AI21Base): | |||
You can view the options at https://github.com/AI21Labs/ai21-python?tab=readme-ov-file#model-types""" | |||
num_results: int = 1 | |||
"""The number of responses to generate for a given prompt.""" | |||
stop: Optional[List[str]] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment about making this stop_sequences and alias stop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missed your comments, will add in another PR
No description provided.