Skip to content

Conversation

@codefromthecrypt
Copy link
Contributor

@codefromthecrypt codefromthecrypt commented Mar 17, 2025

This adds an openai-agents python example via OpenInference.

Note: this is using a git ref for openai-agents as it might not be released by the RHUG tomorrow.

Screenshot 2025-03-19 at 2 07 21 PM

@codefromthecrypt
Copy link
Contributor Author

openinference is now sorted (stellar turnaround). leaving draft for the other topics. Thanks

Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
@codefromthecrypt codefromthecrypt force-pushed the genai-function-calling-openai-agents branch from 1936295 to 22d8d6b Compare March 18, 2025 16:21
@codefromthecrypt
Copy link
Contributor Author

re-ran with latest deps

Screenshot 2025-03-18 at 12 20 39 PM

Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
@codefromthecrypt
Copy link
Contributor Author

ran with azure openai

Screenshot 2025-03-18 at 10 44 21 PM

Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
@codefromthecrypt
Copy link
Contributor Author

added a test as this library changes frequently, but should make the same HTTP requests to openai and the versions endpoint. if something changes, this will detect it.

Args:
major_version: Major version to filter by (e.g. 7, 8). Defaults to latest
"""
async with AsyncClient() as client:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@anuraaga fyi interesting quirk is that if sync VCR doesn't record it. when I set everything async, it does. I didn't get the the bottom of why, but in any case doesn't hurt to make things async since that's the underlying client anyway

Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
@codefromthecrypt codefromthecrypt marked this pull request as ready for review March 19, 2025 14:50
Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
@codefromthecrypt codefromthecrypt merged commit 60b095a into main Mar 20, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants