Skip to content

Commit

Permalink
fix: revert to typed dict and use not required from typing extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
VisargD committed Jan 12, 2024
1 parent 043767f commit 0158a43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions portkey_ai/api_resources/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json
from typing import List, Dict, Any, Optional, Union, Mapping, Literal, TypeVar, cast
from enum import Enum, EnumMeta
from typing_extensions import TypedDict
from typing_extensions import TypedDict, NotRequired
import httpx
import portkey_ai
from pydantic import BaseModel, validator
Expand Down Expand Up @@ -136,10 +136,10 @@ class DeltaToolCall(BaseModel):
function: Optional[DeltaToolCallFunction] = None
type: Optional[str] = None

class Message(BaseModel):
class Message(TypedDict):
role: str
content: Optional[str] = None
tool_calls: Optional[List[ToolCall]] = None
content: Optional[str]
tool_calls: NotRequired[List[ToolCall]]


class Function(BaseModel):
Expand Down

0 comments on commit 0158a43

Please sign in to comment.