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

[Ellipsis] create_partial streaming not behaving as expected #714

Closed
wants to merge 1 commit into from

Conversation

ellipsis-dev[bot]
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot commented May 29, 2024

Summary:

⚠️ We couldn't build/test your project to verify our changes. Add a Dockerfile to significantly improve code quality.

Issue: resolves #665

Implementation:

Step 1: Replace pydantic_core.from_json with jitter.from_json in instructor/dsl/partial.py

In the PartialBase class within the instructor/dsl/partial.py file, replace pydantic_core.from_json with jitter.from_json in the model_from_chunks and model_from_chunks_async methods. Make sure to import jitter at the top of the file. The changes should look like this:

import jitter

...

obj = jitter.from_json(potential_object or "{}", allow_partial=True)

After making the change, test the feature to make sure it's working as expected.

Report:

Step Result Details
1
Replace pydantic_core.from_json with jitter.from_json in instructor/dsl/partial.pyReplaced pydantic_core.from_json with jitter.from_json in the model_from_chunks and model_from_chunks_async methods of the PartialBase class in the instructor/dsl/partial.py file. Also added the import statement for jitter at the top of the file.

Something look wrong?: If this Pull Request doesn't contain the expected changes, add more information to #665. Then, try again. For more information, check the documentation.

Copy link

cloudflare-workers-and-pages bot commented May 29, 2024

Deploying instructor with  Cloudflare Pages  Cloudflare Pages

Latest commit: e1ca7c2
Status:🚫  Build failed.

View logs

@jxnl jxnl closed this May 31, 2024
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.

create_partial streaming not behaving as expected
1 participant