Skip to content

Commit

Permalink
Update generator.py to allow completion_type to be passed as kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
xhluca authored May 29, 2024
1 parent 5a219c0 commit 3c65fa4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions instruct_qa/generation/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def __init__(self, *args, **kwargs):
"text-davinci-003": "completions",
"text-davinci-002": "completions",
}
if "completion_type" in kwargs:
self.model_map[self.model_name] = kwargs["completion_type"]

assert (
self.model_name in self.model_map
), "You should add the model name to the model -> endpoint compatibility mappings."
Expand Down

0 comments on commit 3c65fa4

Please sign in to comment.