improve documentation

This commit is contained in:
Jason
2023-09-13 13:39:09 -04:00
parent e025eaa64f
commit 61cff08909
17 changed files with 453 additions and 145 deletions
+4 -2
View File
@@ -140,9 +140,11 @@ def wrap_chatcompletion(func: Callable) -> Callable:
return wrapper_function
def process_response(response, response_model):
def process_response(response, response_model, validation_context=None):
if response_model is not None:
model = response_model.from_response(response)
model = response_model.from_response(
response, validation_context=validation_context
)
model._raw_response = response
return model
return response