Skip to content

Commit

Permalink
fix(text_completion): allow either model or engine to be set
Browse files Browse the repository at this point in the history
  • Loading branch information
krrishdholakia committed Nov 18, 2023
1 parent 8e430fc commit 3ea776b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion litellm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,7 @@ def embedding(
###### Text Completion ################
def text_completion(
prompt: Union[str, List[Union[str, List[Union[str, List[int]]]]]], # Required: The prompt(s) to generate completions for.
model: Optional[str], # Optional: either `model` or `engine` can be set
model: Optional[str]=None, # Optional: either `model` or `engine` can be set
best_of: Optional[int] = None, # Optional: Generates best_of completions server-side.
echo: Optional[bool] = None, # Optional: Echo back the prompt in addition to the completion.
frequency_penalty: Optional[float] = None, # Optional: Penalize new tokens based on their existing frequency.
Expand Down
2 changes: 1 addition & 1 deletion litellm/tests/test_text_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_completion_openai_engine():
#print(response.choices[0].text)
except Exception as e:
pytest.fail(f"Error occurred: {e}")
# test_completion_openai_engine()
test_completion_openai_engine()


def test_completion_chatgpt_prompt():
Expand Down

0 comments on commit 3ea776b

Please sign in to comment.