mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
docs(main.py): adding docstring for text_completion
This commit is contained in:
parent
09b51fcdb4
commit
1a09bbd4a9
1 changed files with 3 additions and 0 deletions
|
@ -1551,6 +1551,9 @@ def embedding(
|
||||||
|
|
||||||
###### Text Completion ################
|
###### Text Completion ################
|
||||||
def text_completion(*args, **kwargs):
|
def text_completion(*args, **kwargs):
|
||||||
|
"""
|
||||||
|
This maps to the Openai.Completion.create format, which has a different I/O (accepts prompt, returning ["choices"]["text"].
|
||||||
|
"""
|
||||||
if "prompt" in kwargs:
|
if "prompt" in kwargs:
|
||||||
messages = [{"role": "system", "content": kwargs["prompt"]}]
|
messages = [{"role": "system", "content": kwargs["prompt"]}]
|
||||||
kwargs["messages"] = messages
|
kwargs["messages"] = messages
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue