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

Add additional_instructions on openai assistan runs create. #29164

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

winsento
Copy link
Contributor

  • Description: In the functions _create_run and _acreate_run, the parameters passed to the creation of openai.resources.beta.threads.runs were limited.

    Source:

    def _create_run(self, input: dict) -> Any:
          params = {
              k: v
              for k, v in input.items()
              if k in ("instructions", "model", "tools", "run_metadata")
          }
          return self.client.beta.threads.runs.create(
              input["thread_id"],
              assistant_id=self.assistant_id,
              **params,
          )
    
    • OpenAI Documentation (createRun)

    • Full list of parameters openai.resources.beta.threads.runs (source code)

  • Issue: Fix OPenAI Assistnat does not support additional_instructions parameter on create_run method. #17574

  • Lint and test: Run make format, make lint and make test from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 12, 2025
Copy link

vercel bot commented Jan 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 3:05pm

@dosubot dosubot bot added langchain Related to the langchain package Ɑ: agent Related to agents module labels Jan 12, 2025
@winsento
Copy link
Contributor Author

@baskaryan, @efriis, @eyurtsev, @ccurme, @vbarda, @hwchase17 please look at this pull request.
extended_tests fail, but this is not related to my changes.

It seems that cd libs/langchain / make extended_tests fail in the master branch either. How to deal with this situation?

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jan 13, 2025
@ccurme ccurme merged commit 0e31153 into langchain-ai:master Jan 13, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: agent Related to agents module langchain Related to the langchain package lgtm PR looks good. Use to confirm that a PR is ready for merging. size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

OPenAI Assistnat does not support additional_instructions parameter on create_run method.
2 participants