mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-12-23 11:02:40 +03:00
Fix optional fields in api
This commit is contained in:
parent
f2849fce1b
commit
6e99f70191
1
.github/workflows/publish-workflow.yaml
vendored
1
.github/workflows/publish-workflow.yaml
vendored
@ -24,6 +24,7 @@ jobs:
|
||||
python -m etc.tool.openapi
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openapi
|
||||
path: openapi.json
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -91,15 +91,15 @@ def create_app_debug(g4f_api_key: str = None):
|
||||
class ChatCompletionsConfig(BaseModel):
|
||||
messages: Messages = Field(examples=[[{"role": "system", "content": ""}, {"role": "user", "content": ""}]])
|
||||
model: str = Field(default="")
|
||||
provider: Optional[str] = Field(examples=[None])
|
||||
provider: Optional[str] = None
|
||||
stream: bool = False
|
||||
temperature: Optional[float] = Field(examples=[None])
|
||||
max_tokens: Optional[int] = Field(examples=[None])
|
||||
stop: Union[list[str], str, None] = Field(examples=[None])
|
||||
api_key: Optional[str] = Field(examples=[None])
|
||||
web_search: Optional[bool] = Field(examples=[None])
|
||||
proxy: Optional[str] = Field(examples=[None])
|
||||
conversation_id: Optional[str] = Field(examples=[None])
|
||||
temperature: Optional[float] = None
|
||||
max_tokens: Optional[int] = None
|
||||
stop: Union[list[str], str, None] = None
|
||||
api_key: Optional[str] = None
|
||||
web_search: Optional[bool] = None
|
||||
proxy: Optional[str] = None
|
||||
conversation_id: Optional[str] = None
|
||||
|
||||
class ImageGenerationConfig(BaseModel):
|
||||
prompt: str
|
||||
|
Loading…
Reference in New Issue
Block a user