mirror of
https://github.com/open-webui/pipelines
synced 2025-05-10 23:50:45 +00:00
18 lines
350 B
Python
18 lines
350 B
Python
from typing import List
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
|
|
class OpenAIChatMessage(BaseModel):
|
|
role: str
|
|
content: str
|
|
|
|
model_config = ConfigDict(extra="allow")
|
|
|
|
|
|
class OpenAIChatCompletionForm(BaseModel):
|
|
stream: bool = True
|
|
model: str
|
|
messages: List[OpenAIChatMessage]
|
|
|
|
model_config = ConfigDict(extra="allow")
|