From b811689f7668174a45b98d40e885297e99f00518 Mon Sep 17 00:00:00 2001 From: Uma Annamalai Date: Thu, 10 Oct 2024 14:13:32 -0700 Subject: [PATCH] Address review feedback. --- .../withllmcustomattributes-python-agent-api.mdx | 5 +++-- .../python-release-notes/python-agent-100100.mdx | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/content/docs/apm/agents/python-agent/python-agent-api/withllmcustomattributes-python-agent-api.mdx b/src/content/docs/apm/agents/python-agent/python-agent-api/withllmcustomattributes-python-agent-api.mdx index f1737fa7d99..e421fbd4a56 100644 --- a/src/content/docs/apm/agents/python-agent/python-agent-api/withllmcustomattributes-python-agent-api.mdx +++ b/src/content/docs/apm/agents/python-agent/python-agent-api/withllmcustomattributes-python-agent-api.mdx @@ -6,7 +6,7 @@ tags: - Agents - Python agent - Python agent API -metaDescription: 'Python API: This API adds custom attribuets to a Large Language Model (LLM) events generated in AI applications.' +metaDescription: 'Python API: This API adds custom attributes to a Large Language Model (LLM) events generated in AI applications.' redirects: - /docs/agents/python-agent/python-agent-api/withllmcustomattributes-python-agent-api - /docs/agents/python-agent/python-agent-api/withllmcustomattributes @@ -27,8 +27,9 @@ Python agent version 10.1.0 or higher. ## Description [#description] -This context manager API adds custom, user-specified attributes to each LLM event generated within its context based on calls made to LLMs. +This context manager API adds custom user-specified attributes to each LLM event generated within its context based on calls made to LLMs. The agent will automatically add an `llm.` prefix to each custom attribute key name specified in the passed in dictionary argument. +This API must be called within the context of an active transaction. These custom attributes can be viewed on LLM events and queried for in the New Relic UI. For more information on AI Monitoring, see our [AI docs](https://docs.newrelic.com/docs/ai-monitoring/intro-to-ai-monitoring/). diff --git a/src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100100.mdx b/src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100100.mdx index 51905d5f7c0..8d08d8ce186 100644 --- a/src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100100.mdx +++ b/src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100100.mdx @@ -3,14 +3,14 @@ subject: 'Python agent' releaseDate: '2024-10-10' version: 10.1.0 downloadLink: 'https://pypi.python.org/pypi/newrelic' -features: ['Add support for Python 3.13', 'Add new Large LLM custom attribute context manager API', 'Add support for reporting of Amazon ECS Fargate Docker IDs', 'Add instrumentation for `SQLiteVec` vectorstore in Langchain'] +features: ['Add support for Python 3.13', 'Add new LLM custom attribute context manager API', 'Add support for reporting of Amazon ECS Fargate Docker IDs', 'Add instrumentation for `SQLiteVec` vectorstore in Langchain'] bugs: [] security: [] --- ## Notes -This release of the Python agent adds support for Python 3.13, adds a new Large Language Model (LLM) API, supports Docker ID parsing in Amazon ECS environments, and instruments a new Langchain vectorstore. +This release of the Python agent adds support for Python 3.13, adds a new Large Language Model (LLM) API, supports Docker ID parsing in Amazon ECS Fargate environments, and instruments a new Langchain vectorstore. Install the agent using `easy_install/pip/distribute` via the [Python Package Index](https://pypi.python.org/pypi/newrelic) or download it directly from the [New Relic download site](https://download.newrelic.com/python_agent/release). @@ -22,7 +22,7 @@ Install the agent using `easy_install/pip/distribute` via the [Python Package In * The agent now supports applications running in Python 3.13. -* Add new Large LLM custom attribute context manager API +* Add new LLM custom attribute context manager API * The agent now includes a new context manager API that adds custom attributes to LLM events generated from calls to LLMs in application code. For more information on usage, please see our [API documentation](/docs/apm/agents/python-agent/python-agent-api/withllmcustomattributes-python-agent-api).