Skip to content

🚀 Feature: support emitting events for prompts in addition to current behavior #2456

@nirga

Description

@nirga

Which component is this feature for?

All Packages

🔖 Feature description

Fix the following packages and their tests:

  • AlephAlpha
  • Anthropic
  • Bedrock
  • Cohere
  • Google Generative AI
  • Groq
  • Langchain
  • LlamaIndex
  • Mistral AI
  • Ollama
  • OpenAI
  • Replicate
  • SageMaker
  • Together
  • Transformers
  • VertexAI
  • WatsonX

🎤 Why is this feature needed ?

Full compliance with new semantic conventions

✌️ How do you aim to achieve this?

See new OpenAI instrumentation for inspiration.

  • Make sure to keep the current way of emitting events and the new (event-based) way with the official semantic conventions.
  • Add a config to each instrumentation called use_legacy_attributes which defaults to true, and if set to false emit events instead of the prompt / completion attributes.
  • Propagate a new initialization parameter of the SDK called use_legacy_attributes that sets this config in all instrumentations.

🔄️ Additional Information

No response

👀 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions