The Genezio Code Interpreter is a Virtual Machine isolated environment for running Python generated by AI agents.
Project description
Langchain Genezio Code Interpreter
The Langchain Genezio Code Interpreter allows you to add code execution functionality into the LLMs. The code is executed in a secured environment on Genezio Cloud Platform.
Installation
pip install langchain-genezio
Usage
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_anthropic import ChatAnthropic
from langchain_core.prompts import ChatPromptTemplate
from langchain-genezio import GenezioInterpreter
tools = [
GenezioInterpreter(
url=os.getenv("GENEZIO_PROJECT_URL"),
)
]
llm = ChatAnthropic(model="claude-3-haiku-20240307", temperature=0)
prompt_template = ChatPromptTemplate.from_messages(
[
(
"system",
"You are a helpful assistant. Make sure to use a tool if you need to solve a problem.",
),
("human", "{input}"),
("placeholder", "{agent_scratchpad}"),
]
)
agent = create_tool_calling_agent(llm, tools, prompt_template)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
# Ask a tough question
result = agent_executor.invoke({"input": "What is the 888th prime number?"})
print(result["output"][0]["text"])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_genezio-0.1.1.tar.gz.
File metadata
- Download URL: langchain_genezio-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcfeb9b23c6f5ac921fd7526d209ccc677a616e7d3729f81216aa2596b3cbb92
|
|
| MD5 |
278814e3ba82f02b710617fa2ceb00f6
|
|
| BLAKE2b-256 |
951a8d10582217ffde1f13faef8906a87837c61c8933449d7b3971e0db333f0d
|
Provenance
The following attestation bundles were made for langchain_genezio-0.1.1.tar.gz:
Publisher:
publish-to-test-pypi.yml on Genez-io/langchain-genezio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_genezio-0.1.1.tar.gz -
Subject digest:
bcfeb9b23c6f5ac921fd7526d209ccc677a616e7d3729f81216aa2596b3cbb92 - Sigstore transparency entry: 170657633
- Sigstore integration time:
-
Permalink:
Genez-io/langchain-genezio@6cf58b632648cd1ce6a051d23c511fa5c9edbc0b -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Genez-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-test-pypi.yml@6cf58b632648cd1ce6a051d23c511fa5c9edbc0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file langchain_genezio-0.1.1-py3-none-any.whl.
File metadata
- Download URL: langchain_genezio-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e4950aa1b8e78e089473af2a3d31901e56547147fdcf2f01544e9aca600d8c4
|
|
| MD5 |
b3d623cbaa0001993a1686bff7d6f3cd
|
|
| BLAKE2b-256 |
e6fef29dbce95d7e4e78a2d295e5bedbd7eb08996a9c41292d67788a766c6bdb
|
Provenance
The following attestation bundles were made for langchain_genezio-0.1.1-py3-none-any.whl:
Publisher:
publish-to-test-pypi.yml on Genez-io/langchain-genezio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_genezio-0.1.1-py3-none-any.whl -
Subject digest:
6e4950aa1b8e78e089473af2a3d31901e56547147fdcf2f01544e9aca600d8c4 - Sigstore transparency entry: 170657635
- Sigstore integration time:
-
Permalink:
Genez-io/langchain-genezio@6cf58b632648cd1ce6a051d23c511fa5c9edbc0b -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Genez-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-test-pypi.yml@6cf58b632648cd1ce6a051d23c511fa5c9edbc0b -
Trigger Event:
push
-
Statement type: