Skip to content

Commit

Permalink
Feat - introduce func response type
Browse files Browse the repository at this point in the history
  • Loading branch information
aybruhm committed Dec 10, 2023
1 parent 94ac978 commit 8be6ab6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion agenta-cli/agenta/sdk/types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import json
from typing import Any, Dict, List
from typing import Any, Dict, List, Optional

from pydantic import BaseModel, Extra, HttpUrl

Expand All @@ -10,6 +10,19 @@ def __init__(self, file_name: str, file_path: str):
self.file_path = file_path


class FuncTokenUsage(BaseModel):
completion_tokens: str
prompt_tokens: str
total_tokens: str


class FuncResponse(BaseModel):
message: str
usage: Optional[FuncTokenUsage]
cost: Optional[str]
latency: str


class DictInput(dict):
def __new__(cls, default_keys=None):
instance = super().__new__(cls, default_keys)
Expand Down

0 comments on commit 8be6ab6

Please sign in to comment.