From 920fe19608ba06ed8c2b4c9a23944af35cf24e56 Mon Sep 17 00:00:00 2001 From: Raju Komati Date: Fri, 28 Apr 2023 00:40:43 +0530 Subject: added main module for accessing all services --- openai_rev/forefront/models.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 openai_rev/forefront/models.py (limited to 'openai_rev/forefront/models.py') diff --git a/openai_rev/forefront/models.py b/openai_rev/forefront/models.py new file mode 100644 index 00000000..23e90903 --- /dev/null +++ b/openai_rev/forefront/models.py @@ -0,0 +1,26 @@ +from typing import Any, List + +from pydantic import BaseModel + + +class Choice(BaseModel): + text: str + index: int + logprobs: Any + finish_reason: str + + +class Usage(BaseModel): + prompt_tokens: int + completion_tokens: int + total_tokens: int + + +class ForeFrontResponse(BaseModel): + id: str + object: str + created: int + model: str + choices: List[Choice] + usage: Usage + text: str -- cgit v1.2.3