mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
improve documentation
This commit is contained in:
+4
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user