Skip to content

Pass in keyword arguments in embedding utility functions #405

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

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

tuliren
Copy link
Contributor

@tuliren tuliren commented Apr 19, 2023

The embedding utility functions currently only accept a minimum number of arguments. If a user needs to specify a few more keywords, that person can no longer use these functions, making them less useful than they could be. An example is shown in #392, in which an extra request_timeout argument can help bypass an unresolved bug.

This PR solves this problem by adding kwargs to all these utility functions.

Copy link

@aelnosu aelnosu left a comment

Choose a reason for hiding this comment

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

Debugging?
why remove
print(engine)
print(kwargs)

@tuliren
Copy link
Contributor Author

tuliren commented Apr 19, 2023

The print statements were added in my first commit for debugging purposes. They were not in the codebase in the first place. I forgot to remove them when pushing the first commit. That's why I removed them in a second commit.

@aelnosu
Copy link

aelnosu commented Apr 19, 2023

The print statements were added in my first commit for debugging purposes. They were not in the codebase in the first place. I forgot to remove them when pushing the first commit. That's why I removed them in a second commit.

Understood thanks.
:-)

Copy link
Collaborator

@hallacy hallacy left a comment

Choose a reason for hiding this comment

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

Thank you!

@hallacy hallacy merged commit db3f352 into openai:main Apr 19, 2023
@tuliren tuliren deleted the liren/pass-in-kwargs branch April 19, 2023 21:16
cgayapr pushed a commit to cgayapr/openai-python that referenced this pull request Dec 14, 2024
* Pass in kwargs in embedding util functions

* Remove debug code
safa0 pushed a commit to safa0/openai-agents-python that referenced this pull request Apr 27, 2025
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