diff --git a/docs/my-website/docs/observability/athina_integration.md b/docs/my-website/docs/observability/athina_integration.md index 4994d553c6..2e2141169a 100644 --- a/docs/my-website/docs/observability/athina_integration.md +++ b/docs/my-website/docs/observability/athina_integration.md @@ -78,6 +78,7 @@ Following are the allowed fields in metadata, their types, and their description * `context: Optional[Union[dict, str]]` - This is the context used as information for the prompt. For RAG applications, this is the "retrieved" data. You may log context as a string or as an object (dictionary). * `expected_response: Optional[str]` - This is the reference response to compare against for evaluation purposes. This is useful for segmenting inference calls by expected response. * `user_query: Optional[str]` - This is the user's query. For conversational applications, this is the user's last message. +* `tags: Optional[list]` - This is a list of tags. This is useful for segmenting inference calls by tags. * `custom_attributes: Optional[dict]` - This is a dictionary of custom attributes. This is useful for additional information about the inference. ## Using a self hosted deployment of Athina diff --git a/litellm/integrations/athina.py b/litellm/integrations/athina.py index 754e980c2a..f416b30f8e 100644 --- a/litellm/integrations/athina.py +++ b/litellm/integrations/athina.py @@ -23,6 +23,7 @@ class AthinaLogger: "context", "expected_response", "user_query", + "tags", "custom_attributes", ] @@ -78,10 +79,12 @@ class AthinaLogger: # Add additional metadata keys metadata = kwargs.get("litellm_params", {}).get("metadata", {}) if metadata: + print("additional_keys", self.additional_keys) for key in self.additional_keys: + print("key", key) if key in metadata: + print("key is being added", key) data[key] = metadata[key] - response = litellm.module_level_client.post( self.athina_logging_url, headers=self.headers,