mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
rename llms/OpenAI/
-> llms/openai/
(#7154)
* rename OpenAI -> openai * fix file rename * fix rename changes * fix organization of openai/transcription * fix import OA fine tuning API * fix openai ft handler * fix handler import
This commit is contained in:
parent
e903fe6038
commit
bfb6891eb7
48 changed files with 53 additions and 59 deletions
15
litellm/llms/openai/completion/utils.py
Normal file
15
litellm/llms/openai/completion/utils.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
from collections.abc import Iterable
|
||||
from typing import List
|
||||
|
||||
|
||||
def is_tokens_or_list_of_tokens(value: List):
|
||||
# Check if it's a list of integers (tokens)
|
||||
if isinstance(value, list) and all(isinstance(item, int) for item in value):
|
||||
return True
|
||||
# Check if it's a list of lists of integers (list of tokens)
|
||||
if isinstance(value, list) and all(
|
||||
isinstance(item, list) and all(isinstance(i, int) for i in item)
|
||||
for item in value
|
||||
):
|
||||
return True
|
||||
return False
|
Loading…
Add table
Add a link
Reference in a new issue