mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(fix) text_completion naming
This commit is contained in:
parent
356025cd90
commit
9d65867354
1 changed files with 3 additions and 3 deletions
|
@ -1992,13 +1992,13 @@ def text_completion(
|
||||||
## if it's a 2d list - each element in the list is a text_completion() request
|
## if it's a 2d list - each element in the list is a text_completion() request
|
||||||
if len(prompt) > 0 and type(prompt[0]) == list:
|
if len(prompt) > 0 and type(prompt[0]) == list:
|
||||||
responses = [None for x in prompt] # init responses
|
responses = [None for x in prompt] # init responses
|
||||||
for i, request in enumerate(prompt):
|
for i, individual_prompt in enumerate(prompt):
|
||||||
decoded_prompt = tokenizer.decode(request)
|
decoded_prompt = tokenizer.decode(individual_prompt) # type: ignore
|
||||||
response = text_completion(
|
response = text_completion(
|
||||||
model = model,
|
model = model,
|
||||||
prompt=decoded_prompt,
|
prompt=decoded_prompt,
|
||||||
*args,
|
*args,
|
||||||
**kwargs,
|
|
||||||
**optional_params
|
**optional_params
|
||||||
)
|
)
|
||||||
responses[i] = response["choices"][0]
|
responses[i] = response["choices"][0]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue