Is it possible to consume values of
raw
and
additional_kwargs
when defining a custom LLM complete method? I'd like to get back additional information besides the text from the full response when running query() with my custom LLM class. Thanks!
@llm_completion_callback()
def complete(self, prompt: str, **kwargs: Any) -> CompletionResponse:
return CompletionResponse(text="MY RESPONSE", raw=full_reponse, additional_kwargs=full_response)
...
response = query_engine.query(query_str)
# Can't seem to access raw or additional_kwargs in the response...
print(response.raw) # Errors
print(response.additional_kwargs) # Also errors