mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-04-27 11:21:34 +00:00
feat: Add stream information to generate SDKs (#1569)
This commit is contained in:
parent
3e67e21d38
commit
24fae660e6
@ -44,6 +44,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-fern-streaming": {
|
||||
"stream-condition": "stream",
|
||||
"response": {
|
||||
"$ref": "#/components/schemas/OpenAICompletion"
|
||||
},
|
||||
"response-stream": {
|
||||
"$ref": "#/components/schemas/OpenAICompletion"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -86,6 +95,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-fern-streaming": {
|
||||
"stream-condition": "stream",
|
||||
"response": {
|
||||
"$ref": "#/components/schemas/OpenAICompletion"
|
||||
},
|
||||
"response-stream": {
|
||||
"$ref": "#/components/schemas/OpenAICompletion"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -54,6 +54,13 @@ class ChatBody(BaseModel):
|
||||
response_model=None,
|
||||
responses={200: {"model": OpenAICompletion}},
|
||||
tags=["Contextual Completions"],
|
||||
openapi_extra={
|
||||
"x-fern-streaming": {
|
||||
"stream-condition": "stream",
|
||||
"response": {"$ref": "#/components/schemas/OpenAICompletion"},
|
||||
"response-stream": {"$ref": "#/components/schemas/OpenAICompletion"},
|
||||
}
|
||||
},
|
||||
)
|
||||
def chat_completion(
|
||||
request: Request, body: ChatBody
|
||||
|
@ -42,6 +42,13 @@ class CompletionsBody(BaseModel):
|
||||
summary="Completion",
|
||||
responses={200: {"model": OpenAICompletion}},
|
||||
tags=["Contextual Completions"],
|
||||
openapi_extra={
|
||||
"x-fern-streaming": {
|
||||
"stream-condition": "stream",
|
||||
"response": {"$ref": "#/components/schemas/OpenAICompletion"},
|
||||
"response-stream": {"$ref": "#/components/schemas/OpenAICompletion"},
|
||||
}
|
||||
},
|
||||
)
|
||||
def prompt_completion(
|
||||
request: Request, body: CompletionsBody
|
||||
|
Loading…
Reference in New Issue
Block a user