Skip to content
New issue

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

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

Already on GitHub? # to your account

✨ Add metadata support to OpenAIChat #2146

Merged

Conversation

Sunwood-ai-labs
Copy link
Contributor

image

Changes 🔄

Add metadata parameter to OpenAIChat's request_params

Reasons for Change 💭

  • Enhance API request tracking capability
  • Add metadata-based analysis functionality
  • Extend monitoring capabilities

Implementation Details 📋

  • Add metadata field to base_params dictionary

Example ✨

        model = OpenAIChat(
            id=model_name,
            base_url=os.getenv("LITELLM_BASE_URL"),
            api_key=os.getenv("LITELLM_API_KEY"),
            metadata={"user_id": "demo_user",
                      "trace_user_id": "demo_trace_user"},
        )

) add metadata parameter to OpenAIChat request params
@Sunwood-ai-labs Sunwood-ai-labs requested a review from a team as a code owner February 16, 2025 08:11
@dirkbrnd dirkbrnd merged commit a60e94e into agno-agi:main Feb 17, 2025
1 check passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants