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

Add clause to match call_response spec #72

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

medoror
Copy link
Contributor

@medoror medoror commented Feb 6, 2024

Adds a clause to match an {:ok, Message.t()} payload according to the spec for the call function

Addresses #71

@brainlid brainlid merged commit 606cca3 into brainlid:main Feb 15, 2024
1 check passed
@brainlid
Copy link
Owner

Thanks @medoror! Sorry for the delay, been busy in other areas of life. I considered going a couple different directions with this, but ultimately opted for your direct solution. It's clean too.

I was wondering if the ChatModel should always return a message in a list, just to simplify and consolidate the return types. Then I wondered if the OpenAI implementation should actually NOT return a list. The only reason it does is because a caller can request "n" variations which come back in an array. I see no practical use for that though.

In the end, both of the other changes would be more invasive and dramatic and I'm not entirely sure yet which is the better way to go. So this solution works great. Thanks!

❤️💛💙💜

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