Home / Function/ _acreate_thread_and_run() — langchain Function Reference

_acreate_thread_and_run() — langchain Function Reference

Architecture documentation for the _acreate_thread_and_run() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  9a8d9eab_65ef_1fd7_ee85_d9451c12e0a0["_acreate_thread_and_run()"]
  40171661_732e_8178_c8ae_92254ace13fe["OpenAIAssistantRunnable"]
  9a8d9eab_65ef_1fd7_ee85_d9451c12e0a0 -->|defined in| 40171661_732e_8178_c8ae_92254ace13fe
  5912fbae_35d0_fc72_46fb_b0f27a511df7["ainvoke()"]
  5912fbae_35d0_fc72_46fb_b0f27a511df7 -->|calls| 9a8d9eab_65ef_1fd7_ee85_d9451c12e0a0
  style 9a8d9eab_65ef_1fd7_ee85_d9451c12e0a0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/agents/openai_assistant/base.py lines 723–744

    async def _acreate_thread_and_run(self, input_dict: dict, thread: dict) -> Any:
        params = {
            k: v
            for k, v in input_dict.items()
            if k
            in (
                "instructions",
                "model",
                "tools",
                "parallel_tool_calls",
                "top_p",
                "temperature",
                "max_completion_tokens",
                "max_prompt_tokens",
                "run_metadata",
            )
        }
        return await self.async_client.beta.threads.create_and_run(
            assistant_id=self.assistant_id,
            thread=thread,
            **params,
        )

Subdomains

Called By

Frequently Asked Questions

What does _acreate_thread_and_run() do?
_acreate_thread_and_run() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/openai_assistant/base.py.
Where is _acreate_thread_and_run() defined?
_acreate_thread_and_run() is defined in libs/langchain/langchain_classic/agents/openai_assistant/base.py at line 723.
What calls _acreate_thread_and_run()?
_acreate_thread_and_run() is called by 1 function(s): ainvoke.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free