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

Support parallel function calling in pydantic program #8793

Merged
merged 5 commits into from
Nov 9, 2023

Conversation

Disiok
Copy link
Collaborator

@Disiok Disiok commented Nov 9, 2023

Description

Support parallel function calling in pydantic program

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Disiok Disiok marked this pull request as ready for review November 9, 2023 00:41
arguments_str = function_call["arguments"]
print(f"Function call: {name} with args: {arguments_str}")

if isinstance(function_call["arguments"], dict):
Copy link
Collaborator

Choose a reason for hiding this comment

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

ooc when would it be one or the other

Copy link
Collaborator Author

@Disiok Disiok Nov 9, 2023

Choose a reason for hiding this comment

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

this is existing code we have. I think it was due to difference in OpenAI and AzureOpenAI behavior in the past. we should probably validate and strip this out sometime in the future.

Copy link
Contributor

@nerdai nerdai left a comment

Choose a reason for hiding this comment

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

lgtm!

Potentially nit/silly question: but is there a reason we need both Model and BaseModel?

@Disiok
Copy link
Collaborator Author

Disiok commented Nov 9, 2023

lgtm!

Potentially nit/silly question: but is there a reason we need both Model and BaseModel?

Took a look again, the Model is a TypeVar, but looks like we are not using it properly to type the outputs. Thanks for pointing this out, will fix.

@Disiok Disiok merged commit 7148cab into main Nov 9, 2023
@Disiok Disiok deleted the suo/parallel_pydantic branch November 9, 2023 02:28
@ryanpeach ryanpeach mentioned this pull request Feb 7, 2024
15 tasks
ryanpeach pushed a commit to OnScale/llama_index that referenced this pull request Feb 7, 2024
* migrate to tool calls

* wip

* wip

* wip

* wi
@ryanpeach ryanpeach mentioned this pull request Feb 7, 2024
15 tasks
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.

3 participants