Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
minimum_pre_commit_version: 2.20.0
fail_fast: false
default_stages:
- commit
- pre-commit
exclude: (.idea|vscode)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
6 changes: 3 additions & 3 deletions ai21/clients/common/beta/assistant/assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def create(
description: str | NotGiven = NOT_GIVEN,
optimization: Optimization | NotGiven = NOT_GIVEN,
models: List[str] | NotGiven = NOT_GIVEN,
tools: List[Tool] | NotGiven = NOT_GIVEN,
tools: List[Dict[str, Tool]] | NotGiven = NOT_GIVEN,
tool_resources: ToolResources | NotGiven = NOT_GIVEN,
**kwargs,
) -> AssistantResponse:
Expand All @@ -37,7 +37,7 @@ def _create_body(
description: str | NotGiven,
optimization: str | NotGiven,
models: List[str] | NotGiven,
tools: List[str] | NotGiven,
tools: List[Dict[str, Tool]] | NotGiven,
tool_resources: dict | NotGiven,
**kwargs,
) -> Dict[str, Any]:
Expand Down Expand Up @@ -71,7 +71,7 @@ def modify(
optimization: Optimization | NotGiven = NOT_GIVEN,
is_archived: bool | NotGiven = NOT_GIVEN,
models: List[str] | NotGiven = NOT_GIVEN,
tools: List[Tool] | NotGiven = NOT_GIVEN,
tools: List[Dict[str, Tool]] | NotGiven = NOT_GIVEN,
tool_resources: ToolResources | NotGiven = NOT_GIVEN,
) -> AssistantResponse:
pass
Expand Down
10 changes: 5 additions & 5 deletions ai21/clients/studio/resources/beta/assistant/assistant.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import List
from typing import Dict, List

from ai21.clients.common.beta.assistant.assistants import BaseAssistants
from ai21.clients.studio.resources.beta.assistant.assistants_plans import AssistantPlans, AsyncAssistantPlans
Expand Down Expand Up @@ -30,7 +30,7 @@ def create(
description: str | NotGiven = NOT_GIVEN,
optimization: str | NotGiven = NOT_GIVEN,
models: List[str] | NotGiven = NOT_GIVEN,
tools: List[Tool] | NotGiven = NOT_GIVEN,
tools: List[Dict[str, Tool]] | NotGiven = NOT_GIVEN,
tool_resources: ToolResources | NotGiven = NOT_GIVEN,
**kwargs,
) -> AssistantResponse:
Expand Down Expand Up @@ -61,7 +61,7 @@ def modify(
optimization: str | NotGiven = NOT_GIVEN,
is_archived: bool | NotGiven = NOT_GIVEN,
models: List[str] | NotGiven = NOT_GIVEN,
tools: List[Tool] | NotGiven = NOT_GIVEN,
tools: List[Dict[str, Tool]] | NotGiven = NOT_GIVEN,
tool_resources: ToolResources | NotGiven = NOT_GIVEN,
) -> AssistantResponse:
body = self._create_body(
Expand Down Expand Up @@ -94,7 +94,7 @@ async def create(
description: str | NotGiven = NOT_GIVEN,
optimization: str | NotGiven = NOT_GIVEN,
models: List[str] | NotGiven = NOT_GIVEN,
tools: List[Tool] | NotGiven = NOT_GIVEN,
tools: List[Dict[str, Tool]] | NotGiven = NOT_GIVEN,
tool_resources: ToolResources | NotGiven = NOT_GIVEN,
**kwargs,
) -> AssistantResponse:
Expand Down Expand Up @@ -125,7 +125,7 @@ async def modify(
optimization: str | NotGiven = NOT_GIVEN,
is_archived: bool | NotGiven = NOT_GIVEN,
models: List[str] | NotGiven = NOT_GIVEN,
tools: List[Tool] | NotGiven = NOT_GIVEN,
tools: List[Dict[str, Tool]] | NotGiven = NOT_GIVEN,
tool_resources: ToolResources | NotGiven = NOT_GIVEN,
) -> AssistantResponse:
body = self._create_body(
Expand Down
4 changes: 2 additions & 2 deletions ai21/models/responses/assistant_response.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from datetime import datetime
from typing import Optional, List, Literal
from typing import Optional, List, Literal, Any, Dict

from ai21.models.ai21_base_model import AI21BaseModel
from ai21.models.assistant.assistant import ToolResources
Expand All @@ -18,7 +18,7 @@ class AssistantResponse(AI21BaseModel):
avatar: Optional[str] = None
is_archived: bool = False
models: Optional[List[str]] = None
tools: Optional[List[str]] = None
tools: Optional[List[Dict[str, Any]]] = None
tool_resources: Optional[ToolResources] = None


Expand Down
Loading