Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

AnsariZayd
Copy link

Removed the testenv file and now using pytest.

AnsariZayd and others added 4 commits September 18, 2024 13:30
…d the refusal state. Created a unitTest.py file for testing and app.log file for checking the log is successfully saved or not.
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. python Pull requests that update Python code testing labels Sep 19, 2024
Copy link
Member

@nirga nirga left a 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")
Copy link
Member

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(
Copy link
Member

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):
Copy link
Member

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

@nirga
Copy link
Member

nirga commented Oct 17, 2024

Fixed with #2111

@nirga nirga closed this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code size:M This PR changes 30-99 lines, ignoring generated files. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants