Skip to content

feat(instrumentation): add helpers for remaining semantic conventions #1606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

axiomofjoy
Copy link
Contributor

@axiomofjoy axiomofjoy commented May 11, 2025

Adds the following helpers

  • get_reranker_attributes
  • get_retriever_attributes
  • get_embedding_attributes
  • get_context_attributes
  • get_session_attributes
  • get_tag_attributes
  • get_metadata_attributes
  • get_user_id_attributes

Enhances get_llm_token_count_attributes to record new prompt details for audio, cache read, and cache write tokens.

resolves #7513

@axiomofjoy axiomofjoy requested a review from a team as a code owner May 11, 2025 12:01
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 11, 2025
@axiomofjoy axiomofjoy marked this pull request as draft May 11, 2025 12:01
@axiomofjoy axiomofjoy changed the title feat(instrumentation): add helpers for remaining methods feat(instrumentation): add helpers for remaining semantic conventions May 11, 2025
@axiomofjoy axiomofjoy force-pushed the xander/instrumentation branch from 3fa0d9e to 288cc54 Compare May 11, 2025 16:09
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@axiomofjoy axiomofjoy marked this pull request as ready for review May 13, 2025 15:18
Comment on lines +61 to +68
def get_reranker_attributes(
*,
query: Optional[str] = None,
model_name: Optional[str] = None,
input_documents: Optional[List[Document]] = None,
output_documents: Optional[List[Document]] = None,
top_k: Optional[int] = None,
) -> Dict[str, AttributeValue]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add docstrings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants