Skip to main content

An integration package connecting Azure Container Apps dynamic sessions and GigaChain

Project description

langchain-azure-dynamic-sessions

This package contains the LangChain integration for Azure Container Apps dynamic sessions. You can use it to add a secure and scalable code interpreter to your agents.

Installation

pip install -U langchain-azure-dynamic-sessions

Usage

You first need to create an Azure Container Apps session pool and obtain its management endpoint. Then you can use the SessionsPythonREPLTool tool to give your agent the ability to execute Python code.

from langchain_azure_dynamic_sessions import SessionsPythonREPLTool


# get the management endpoint from the session pool in the Azure portal
tool = SessionsPythonREPLTool(pool_management_endpoint=POOL_MANAGEMENT_ENDPOINT)

prompt = hub.pull("hwchase17/react")
tools=[tool]
react_agent = create_react_agent(
    llm=llm,
    tools=tools,
    prompt=prompt,
)

react_agent_executor = AgentExecutor(agent=react_agent, tools=tools, verbose=True, handle_parsing_errors=True)

react_agent_executor.invoke({"input": "What is the current time in Vancouver, Canada?"})

By default, the tool uses DefaultAzureCredential to authenticate with Azure. If you're using a user-assigned managed identity, you must set the AZURE_CLIENT_ID environment variable to the ID of the managed identity.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gigachain_azure_dynamic_sessions-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file gigachain_azure_dynamic_sessions-0.1.0.tar.gz.

File metadata

File hashes

Hashes for gigachain_azure_dynamic_sessions-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e7b3b8105f897635e743d373dd94c9b5e2dacdc5362a27549cf81a41624048a5
MD5 8f16ac6c058da6c5ad40198d8a0a6a77
BLAKE2b-256 2f4806d8554aaa3ac929b268729cdb2250c1ba493373ed1e5d94062bd325e972

See more details on using hashes here.

File details

Details for the file gigachain_azure_dynamic_sessions-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gigachain_azure_dynamic_sessions-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd36284165a4264ea9c31dec873e11066f39d13c8fe8b7baba270dec0f6e6fd1
MD5 387d2ac936d154ae68f89d6cdefc5c00
BLAKE2b-256 dcf048f8e1f4896d03388562e0a2a93c0683a9d70bdc0cc711c4405b035c1bc5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page