The information in the response field 'usage_metadata' is missing. Is it possible to add this info to the Generation object as what langchain-vertexai does?
so example in langchain_google_vertexai.llm
if self._is_gemini_model:
usage_metadata = res.to_dict().get("usage_metadata")
else:
usage_metadata = res.raw_prediction_response.metadata
generations.append(
[
self._candidate_to_generation(r, usage_metadata=usage_metadata)
for r in res.candidates
]
)
The information in the response field 'usage_metadata' is missing. Is it possible to add this info to the Generation object as what langchain-vertexai does?
so example in langchain_google_vertexai.llm