File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,16 @@ def track_openai_metrics(self, func):
172172 """
173173 Track OpenAI-specific operations.
174174
175+ This function will track the duration of the operation, the token
176+ usage, and the success or error status.
177+
178+ If the provided function throws, then this method will also throw.
179+
180+ In the case the provided function throws, this function will record the
181+ duration and an error.
182+
183+ A failed operation will not have any token usage data.
184+
175185 :param func: Function to track.
176186 :return: Result of the tracked function.
177187 """
@@ -190,6 +200,10 @@ def track_bedrock_converse_metrics(self, res: dict) -> dict:
190200 """
191201 Track AWS Bedrock conversation operations.
192202
203+
204+ This function will track the duration of the operation, the token
205+ usage, and the success or error status.
206+
193207 :param res: Response dictionary from Bedrock.
194208 :return: The original response dictionary.
195209 """
You can’t perform that action at this time.
0 commit comments