Skip to content
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

small updates to llama model class #70

Closed
wants to merge 9 commits into from

Conversation

vibhav-vineet
Copy link
Collaborator

Small updates to LlamaServerlessAzureRestEndpointModel class in models.py while creating request.

- Adds support for multi-turn conversations to all the model APIs that
support it. (***Gemini API is the only model that either does not take a
list of messages, or I haven't figured it out yet.)
- Also adds support for Azure authorization scope to be configured via
model config.

---------

Co-authored-by: Safoora Yousefi <[email protected]>
@@ -292,7 +292,8 @@ def create_request(self, text_prompt, query_images=None, *args, **kwargs):
user_content = {"role": "user", "content": text_prompt}
if query_images:
if len(query_images) > 1:
raise ValueError("Llama vision model does not support more than 1 image.")
logging.warning("Llama vision model does not support more than 1 image.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this? Return None from create_request, passes the None to get_response and I'm not sure how urllib.request.urlopen behaves if Request object is None.

As we discussed, please adjust this return value in a way that you can handle the situation properly in handle_request_error, and return do_return True so the request does not get attempted again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants