Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Overloaded MultipleCompletionLLMModel.call type #13
Overloaded MultipleCompletionLLMModel.call type #13
Changes from 10 commits
7146c91
1dcda13
2847af7
2eac4a6
6fbf2f2
5d3a3c9
3f650fc
7edd613
bae8765
1e6eb78
cb16d19
7966f9a
9e91858
29e4d91
f8090bb
418fa3b
ba974e5
c34b02c
270948e
86d455d
7ef8f49
03ede77
7d196df
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
When would we expect someone to use these overloads instead of the dedicated methods
call_single
andcall_multiple
?IMO, it would be easier to maintain just two methods:
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.
I like Sid's suggestion too. Also, let's make a docstring somewhere mentioning what
n
does on the "back end". Readers won't intuitively know whatn
means, it can refer to so many things.On a related note,
MultipleCompletionLLMModel.achat
callslitellm.acompletion
. Can we renameMultipleCompletionLLMModel.achat
to beMultipleCompletionLLMModel.acompletion
to standardize with the actual API endpoint ultimately being invoked?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.
It looks like we still have the overloads,
call_single
, andcall_multiple
here - can we reduce this tocall
andcall_single
?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.
We should raise an error if
n<=0
. And I don't think we need to emit a logging message ifn
is unspecified, since that will be a common case