-
Notifications
You must be signed in to change notification settings - Fork 694
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
Structured output for openai #1996
Conversation
…d the refusal state. Created a unitTest.py file for testing and app.log file for checking the log is successfully saved or not.
…strumentation/openai/testlog.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @AnsariZayd thanks but we should try to stay as close as we can to the current code. Left some comments :)
@@ -88,6 +88,10 @@ def wrapper(wrapped, instance, args, kwargs): | |||
args, | |||
kwargs, | |||
) | |||
span = tracer.start_span(name="openai.response") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be on the original span and not on a new one
from utils import handle_structured_output # Ensure this import is correct | ||
|
||
# Configure logging to write to a file | ||
logging.basicConfig( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for this
|
||
logging.info("Logging configuration set up.") | ||
|
||
class TestHandleStructuredOutput(unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not pytest - please take a look at existing tests and extend
Fixed with #2111 |
Removed the testenv file and now using pytest.