This commit is contained in:
Jason Liu
2023-10-24 15:08:44 -04:00
parent 3ecc25495f
commit 840cd63953
26 changed files with 424 additions and 54 deletions
+3 -1
View File
@@ -46,7 +46,9 @@ def handle_response_model(response_model: Type[BaseModel], kwargs):
return response_model, new_kwargs
def process_response(response, response_model, validation_context: dict = None, strict=None): # type: ignore
def process_response(
response, response_model, validation_context: dict = None, strict=None
): # type: ignore
"""Processes a OpenAI response with the response model, if available
It can use `validation_context` and `strict` to validate the response
via the pydantic model