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

Cerebras exception correction and Gemini installation advice #66

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

marklysze
Copy link
Collaborator

Why are these changes needed?

  1. Currently, if there's an exception raised in the client classes it will fail as the Cerebras exceptions aren't defaulted to an Exception object if Cerebras is not installed. This corrects that.
  2. To run the Gemini client class both google-generativeai and vertexai packages need to be installed. Currently the ImportError message omits the vertexai requirement. This corrects that.

Checks

autogen/oai/client.py Show resolved Hide resolved
@Hk669 Hk669 enabled auto-merge October 18, 2024 13:09
@Hk669 Hk669 requested a review from henrytwo October 18, 2024 17:34
@marklysze
Copy link
Collaborator Author

Thanks for the review @Hk669, @henrytwo just a note that the update isn't Cerebras functionality as such, just the way we handle errors.

@Hk669
Copy link
Collaborator

Hk669 commented Oct 18, 2024

Thanks for the review @Hk669, @henrytwo just a note that the update isn't Cerebras functionality as such, just the way we handle errors.

Yes, i just wanted to check with @henrytwo if there are any exceptions handled or provided with the cerebras library. Looks good to me. thanks @marklysze for the PR..

@Hk669 Hk669 added this pull request to the merge queue Oct 18, 2024
Merged via the queue into main with commit 66f195b Oct 18, 2024
157 of 164 checks passed
@Hk669 Hk669 deleted the clientfixes branch October 18, 2024 19:47
@henrytwo
Copy link
Collaborator

Thanks for the review @Hk669, @henrytwo just a note that the update isn't Cerebras functionality as such, just the way we handle errors.

Yes, i just wanted to check with @henrytwo if there are any exceptions handled or provided with the cerebras library. Looks good to me. thanks @marklysze for the PR..

We have a list of exceptions our SDK could emit here: https://github.com/Cerebras/cerebras-cloud-sdk-python?tab=readme-ov-file#handling-errors

https://github.com/autogen-ai/autogen/blob/84066b15b031430b0a817ef8c11ea415c30e04e4/autogen/oai/client.py#L52-L56

But it doesn't look like all of them are listed here. I didn't think about other exceptions we could emit. Let me know if you would like these other exceptions to be handled the same way as you did in this PR too.

odoochain pushed a commit to odoochain/autogen that referenced this pull request Nov 10, 2024
odoochain pushed a commit to odoochain/autogen that referenced this pull request Nov 10, 2024
* adds devcontainer setup, docker-compose based

* add python via a feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alt-models Non-OpenAI Models / Client Classes bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants