diff --git a/.github/workflows/publish-workflow.yaml b/.github/workflows/publish-workflow.yaml index 82d21cb7..ebddb1f3 100644 --- a/.github/workflows/publish-workflow.yaml +++ b/.github/workflows/publish-workflow.yaml @@ -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 diff --git a/g4f/api/__init__.py b/g4f/api/__init__.py index fc8a4339..3b1c540f 100644 --- a/g4f/api/__init__.py +++ b/g4f/api/__init__.py @@ -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