summaryrefslogtreecommitdiffstats
path: root/openai_rev/forefront/models.py
diff options
context:
space:
mode:
authorRaju Komati <komatiraju032@gmail.com>2023-04-27 21:10:43 +0200
committerRaju Komati <komatiraju032@gmail.com>2023-04-27 21:10:43 +0200
commit920fe19608ba06ed8c2b4c9a23944af35cf24e56 (patch)
treeaf356603b7918af1ea5cdfe0c48830a599ee5903 /openai_rev/forefront/models.py
parentUpdate README.md (diff)
downloadgpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar.gz
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar.bz2
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar.lz
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar.xz
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar.zst
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.zip
Diffstat (limited to 'openai_rev/forefront/models.py')
-rw-r--r--openai_rev/forefront/models.py26
1 files changed, 26 insertions, 0 deletions
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