diff --git a/CHANGELOG.md b/CHANGELOG.md index 857f84c..3c4e87d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.8.5] - 2025-03-28 +### Added +- prompt_event_name and generation_event_name to track_llm_events + ## [1.8.4] - 2025-03-17 ### Added - thread_id to track_llm_events diff --git a/pyproject.toml b/pyproject.toml index 7a8dc60..b53d863 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "trubrics" -version = "1.8.4" +version = "1.8.5" requires-python = ">=3.10" license = { text = "Apache 2.0" } authors = [ diff --git a/trubrics/main.py b/trubrics/main.py index dc3c58d..254847d 100644 --- a/trubrics/main.py +++ b/trubrics/main.py @@ -115,6 +115,8 @@ def track_llm( user_id: str, prompt: str, generation: str, + prompt_event_name: str = "Prompt", + generation_event_name: str = "Generation", assistant_id: str | None = None, properties: dict | None = None, timestamp: datetime | None = None, @@ -127,6 +129,8 @@ def track_llm( user_id (str): The ID of the user. prompt (str): The prompt given to the LLM. generation (str): The generated response from the LLM. + prompt_event_name (str): The name given to the prompt event in Trubrics. + generation_event_name (str): The name given to the generation event in Trubrics. assistant_id (str | None): The ID of the assistant. properties (dict | None): Additional properties to track. timestamp (datetime | None): The timestamp of the generation event. If None, the current time in UTC is used. @@ -138,6 +142,8 @@ def track_llm( "user_id": user_id, "prompt": prompt, "generation": generation, + "prompt_event_name": prompt_event_name, + "generation_event_name": generation_event_name, "assistant_id": assistant_id, "properties": properties, "timestamp": (