dora-openai-server 0.3.10rc0__py3-none-any.whl → 0.3.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,5 @@
1
+ """TODO: Add docstring."""
2
+
1
3
  import os
2
4
 
3
5
  # Define the path to the README file relative to the package directory
@@ -1,3 +1,5 @@
1
+ """TODO: Add docstring."""
2
+
1
3
  import ast
2
4
  import asyncio
3
5
  from typing import List, Optional
@@ -13,11 +15,15 @@ app = FastAPI()
13
15
 
14
16
 
15
17
  class ChatCompletionMessage(BaseModel):
18
+ """TODO: Add docstring."""
19
+
16
20
  role: str
17
21
  content: str
18
22
 
19
23
 
20
24
  class ChatCompletionRequest(BaseModel):
25
+ """TODO: Add docstring."""
26
+
21
27
  model: str
22
28
  messages: List[ChatCompletionMessage]
23
29
  temperature: Optional[float] = 1.0
@@ -25,6 +31,8 @@ class ChatCompletionRequest(BaseModel):
25
31
 
26
32
 
27
33
  class ChatCompletionResponse(BaseModel):
34
+ """TODO: Add docstring."""
35
+
28
36
  id: str
29
37
  object: str
30
38
  created: int
@@ -38,6 +46,7 @@ node = Node() # provide the name to connect to the dataflow if dynamic node
38
46
 
39
47
  @app.post("/v1/chat/completions")
40
48
  async def create_chat_completion(request: ChatCompletionRequest):
49
+ """TODO: Add docstring."""
41
50
  data = next(
42
51
  (msg.content for msg in request.messages if msg.role == "user"),
43
52
  "No user message found.",
@@ -95,6 +104,7 @@ async def create_chat_completion(request: ChatCompletionRequest):
95
104
 
96
105
  @app.get("/v1/models")
97
106
  async def list_models():
107
+ """TODO: Add docstring."""
98
108
  return {
99
109
  "object": "list",
100
110
  "data": [
@@ -109,6 +119,7 @@ async def list_models():
109
119
 
110
120
 
111
121
  async def run_fastapi():
122
+ """TODO: Add docstring."""
112
123
  config = uvicorn.Config(app, host="0.0.0.0", port=8000, log_level="info")
113
124
  server = uvicorn.Server(config)
114
125
 
@@ -121,6 +132,7 @@ async def run_fastapi():
121
132
 
122
133
 
123
134
  def main():
135
+ """TODO: Add docstring."""
124
136
  asyncio.run(run_fastapi())
125
137
 
126
138
 
@@ -1,12 +1,12 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: dora-openai-server
3
- Version: 0.3.10rc0
3
+ Version: 0.3.11
4
4
  Summary: Dora OpenAI API Server
5
5
  Author-email: Haixuan Xavier Tao <tao.xavier@outlook.com>, Enzo Le Van <dev@enzo-le-van.fr>
6
6
  License: MIT
7
7
  Requires-Python: >=3.8
8
8
  Description-Content-Type: text/markdown
9
- Requires-Dist: dora-rs>=0.3.6
9
+ Requires-Dist: dora-rs>=0.3.9
10
10
  Requires-Dist: numpy<2.0.0
11
11
  Requires-Dist: pyarrow>=5.0.0
12
12
  Requires-Dist: fastapi>=0.115
@@ -0,0 +1,7 @@
1
+ dora_openai_server/__init__.py,sha256=tF7WHhHiDweUUzyHsbmFe_ktphE08aA5j33E4ja1udA,381
2
+ dora_openai_server/main.py,sha256=F-glqnWi2aR35uG8KG_yXn1fhx_JsnlhMa4dDkDkpKw,3633
3
+ dora_openai_server-0.3.11.dist-info/METADATA,sha256=9JqGUG80jYFb2nw9fjT58jSErNS0NcRgqkkxj58iWt4,643
4
+ dora_openai_server-0.3.11.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
5
+ dora_openai_server-0.3.11.dist-info/entry_points.txt,sha256=d8EfbKX3cKlpphEAXvq47yK8wnC32GURTrn5PM3F_Js,68
6
+ dora_openai_server-0.3.11.dist-info/top_level.txt,sha256=eISRjpcIXoox34EZVT9C3ccqVT5SsPxboJjIhDePq1Y,19
7
+ dora_openai_server-0.3.11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,7 +0,0 @@
1
- dora_openai_server/__init__.py,sha256=HuSK3dnyI9Pb5QAuaKFwQQ3J5SIZnLcKHPJO0norGzc,353
2
- dora_openai_server/main.py,sha256=s9N-ruIUFcCMVAXyKVZsEKMxYkCaN4yZzA--EhIhpm8,3385
3
- dora_openai_server-0.3.10rc0.dist-info/METADATA,sha256=a-qBIQ8svrc6285SLAWY8i43X08_iglQ3YehOmojwAw,646
4
- dora_openai_server-0.3.10rc0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
5
- dora_openai_server-0.3.10rc0.dist-info/entry_points.txt,sha256=d8EfbKX3cKlpphEAXvq47yK8wnC32GURTrn5PM3F_Js,68
6
- dora_openai_server-0.3.10rc0.dist-info/top_level.txt,sha256=eISRjpcIXoox34EZVT9C3ccqVT5SsPxboJjIhDePq1Y,19
7
- dora_openai_server-0.3.10rc0.dist-info/RECORD,,