This commit is contained in:
SwiftDev 2025-04-24 01:02:42 -07:00 committed by GitHub
commit a361b0c195
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,7 +35,7 @@ azure_assistants_api = AzureAssistantsAPI()
async def aget_assistants(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
client: Optional[AsyncOpenAI] = None,
**kwargs,
) -> AsyncCursorPage[Assistant]:
@ -72,7 +72,7 @@ async def aget_assistants(
def get_assistants(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
client: Optional[Any] = None,
api_key: Optional[str] = None,
api_base: Optional[str] = None,
@ -205,7 +205,7 @@ def get_assistants(
async def acreate_assistants(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
client: Optional[AsyncOpenAI] = None,
**kwargs,
) -> Assistant:
@ -244,7 +244,7 @@ async def acreate_assistants(
def create_assistants(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
model: str,
name: Optional[str] = None,
description: Optional[str] = None,
@ -405,7 +405,7 @@ def create_assistants(
async def adelete_assistant(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
client: Optional[AsyncOpenAI] = None,
**kwargs,
) -> AssistantDeleted:
@ -443,7 +443,7 @@ async def adelete_assistant(
def delete_assistant(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
assistant_id: str,
client: Optional[Any] = None,
api_key: Optional[str] = None,
@ -586,7 +586,7 @@ def delete_assistant(
async def acreate_thread(
custom_llm_provider: Literal["openai", "azure"], **kwargs
custom_llm_provider: Literal["openai", "azure"] = "openai", **kwargs
) -> Thread:
loop = asyncio.get_event_loop()
### PASS ARGS TO GET ASSISTANTS ###
@ -621,7 +621,7 @@ async def acreate_thread(
def create_thread(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
messages: Optional[Iterable[OpenAICreateThreadParamsMessage]] = None,
metadata: Optional[dict] = None,
tool_resources: Optional[OpenAICreateThreadParamsToolResources] = None,
@ -764,7 +764,7 @@ def create_thread(
async def aget_thread(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
thread_id: str,
client: Optional[AsyncOpenAI] = None,
**kwargs,
@ -802,7 +802,7 @@ async def aget_thread(
def get_thread(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
thread_id: str,
client=None,
**kwargs,
@ -921,7 +921,7 @@ def get_thread(
async def a_add_message(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
thread_id: str,
role: Literal["user", "assistant"],
content: str,
@ -974,7 +974,7 @@ async def a_add_message(
def add_message(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
thread_id: str,
role: Literal["user", "assistant"],
content: str,
@ -1105,7 +1105,7 @@ def add_message(
async def aget_messages(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
thread_id: str,
client: Optional[AsyncOpenAI] = None,
**kwargs,
@ -1150,7 +1150,7 @@ async def aget_messages(
def get_messages(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
thread_id: str,
client: Optional[Any] = None,
**kwargs,
@ -1274,7 +1274,7 @@ def arun_thread_stream(
async def arun_thread(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
thread_id: str,
assistant_id: str,
additional_instructions: Optional[str] = None,
@ -1341,7 +1341,7 @@ def run_thread_stream(
def run_thread(
custom_llm_provider: Literal["openai", "azure"],
custom_llm_provider: Literal["openai", "azure"] = "openai",
thread_id: str,
assistant_id: str,
additional_instructions: Optional[str] = None,