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:
Ishaan Jaff 2024-12-10 20:14:07 -08:00 committed by GitHub
parent e903fe6038
commit bfb6891eb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 53 additions and 59 deletions

View 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