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

Use GEMINI_JSON as default #1286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dylanjcastillo
Copy link
Contributor

@dylanjcastillo dylanjcastillo commented Dec 27, 2024

Makes GEMINI_JSON default, and warns users about key ordering issue.

Fixes #1285.


Important

Change default mode to GEMINI_JSON in from_gemini() and update documentation for field order warning.

  • Behavior:
    • Change default mode to GEMINI_JSON in from_gemini() in instructor/client_gemini.py.
    • Warns about field order issue in docs/concepts/patching.md.
  • Documentation:
    • Fix typo in section title in docs/concepts/patching.md.

This description was created by Ellipsis for 25045ab. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 25045ab in 16 seconds

More details
  • Looked at 58 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. instructor/client_gemini.py:14
  • Draft comment:
    The default mode has been changed from GEMINI_TOOLS to GEMINI_JSON. Ensure that this change is communicated to users, as it may affect existing implementations relying on the previous default.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR changes the default mode from GEMINI_TOOLS to GEMINI_JSON in the from_gemini function. This change is consistent across all overloads and the main function definition. The change aligns with the PR's intent to make GEMINI_JSON the default mode due to its better performance in chain-of-thought reasoning tasks, as described in the issue.
2. docs/concepts/patching.md:38
  • Draft comment:
    The addition of the warning about field order not being preserved in Gemini tool calling is a good update. It informs users about potential issues with relying on field order in responses.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The documentation update in patching.md correctly reflects the change in default mode to GEMINI_JSON. This aligns with the PR's intent and provides users with a warning about the key ordering issue.
3. docs/concepts/patching.md:38
  • Draft comment:
    The code example should be updated to reflect the new default mode instructor.Mode.GEMINI_JSON.
    genai.GenerativeModel(), mode=instructor.Mode.GEMINI_JSON
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.

Workflow ID: wflow_Cl8dA1hv0bkdHYhB


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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.

GEMINI_TOOL breaks chain-of-thought reasoning
1 participant