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

Model features : json mode #108

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Conversation

raspawar
Copy link
Collaborator

Json Mode:

Validated the json mode support models.
~18 models from API catalogue support json mode.

Example usage in Notebook and test cases for json mode support.

chat = ChatNVIDIA(model=tool_models[0].id).bind(
    response_format={"type": "json_object"}
)

cc: @sumitkbh

@raspawar raspawar requested a review from mattf October 17, 2024 12:25
Copy link
Collaborator

@mattf mattf left a comment

Choose a reason for hiding this comment

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

@raspawar raspawar requested a review from mattf October 30, 2024 11:56
@@ -647,8 +672,11 @@ def bind_functions(
# as a result need to type ignore for the schema parameter and return type.
def with_structured_output( # type: ignore
self,
schema: Union[Dict, Type],
schema: Optional[Union[Dict, Type]] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

the base class' signature does not let schema=None. why make this change?

Copy link
Collaborator

@mattf mattf left a comment

Choose a reason for hiding this comment

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

ok. consider removing the function_calling option since it's ignored and default to json_schema.

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