-
Couldn't load subscription status.
- Fork 465
litellm updates to support only messages llm kwarg #1082
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
Conversation
| reask_messages: list[Dict[str, str]] = [ | ||
| { | ||
| "role": "user", | ||
| "content": REASK_PROMPT, | ||
| } | ||
| ], |
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.
Pre-initializing lists in _init functions can have odd behaviors sometimes.
def foo(my_list=[]):
my_list.append(len(my_list))
return my_list
>>> foo()
[0]
>>> foo()
[0, 1]
>>> foo()
[0, 1, 2]
If we're modifying and appending to reask_messages internally, we should instead default this to None and check inside the method if it's None.
this pr:
needs
guardrails-ai/interfaces#13
guardrails-ai/guardrails-api#78
guardrails-ai/guardrails-api-client#26