langchain-genezio


Namelangchain-genezio JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryThe Genezio Code Interpreter is a Virtual Machine isolated environment for running Python generated by AI agents.
upload_time2025-02-12 14:19:59
maintainerNone
docs_urlNone
authorGenezio
requires_python<4.0,>=3.9
licenseMIT
keywords langchain genezio code-interpreter ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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"])
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "langchain-genezio",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "langchain, genezio, code-interpreter, ai",
    "author": "Genezio",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/04/40/20ae60255c1e1a7b74919a06f6d254c00d3e4a16d07280977ea6a574ab31/langchain_genezio-0.1.2.tar.gz",
    "platform": null,
    "description": "# Langchain Genezio Code Interpreter\n\nThe 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. \n\n## Installation\n\n```\npip install langchain-genezio\n```\n\n## Usage\n\n```\nfrom langchain.agents import AgentExecutor, create_tool_calling_agent\nfrom langchain_anthropic import ChatAnthropic\nfrom langchain_core.prompts import ChatPromptTemplate\nfrom langchain-genezio import GenezioInterpreter\n\ntools = [\n    GenezioInterpreter(\n        url=os.getenv(\"GENEZIO_PROJECT_URL\"),\n    )\n]\n\nllm = ChatAnthropic(model=\"claude-3-haiku-20240307\", temperature=0)\n\nprompt_template = ChatPromptTemplate.from_messages(\n    [\n        (\n            \"system\",\n            \"You are a helpful assistant. Make sure to use a tool if you need to solve a problem.\",\n        ),\n        (\"human\", \"{input}\"),\n        (\"placeholder\", \"{agent_scratchpad}\"),\n    ]\n)\n\nagent = create_tool_calling_agent(llm, tools, prompt_template)\nagent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)\n# Ask a tough question\nresult = agent_executor.invoke({\"input\": \"What is the 888th prime number?\"})\nprint(result[\"output\"][0][\"text\"])\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The Genezio Code Interpreter is a Virtual Machine isolated environment for running Python generated by AI agents.",
    "version": "0.1.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/Genez-io/langchain-genezio/issues",
        "Homepage": "https://github.com/Genez-io/langchain-genezio"
    },
    "split_keywords": [
        "langchain",
        " genezio",
        " code-interpreter",
        " ai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8d79155ae70ee6ac68ee3d05233d8123d72e132adcc97987b71552930bad6185",
                "md5": "f353b92011b796f6917484049f80505e",
                "sha256": "b61a2fdcb0612765c024ed46e859594996d9f0751f0f7abb29f0be8c57522f06"
            },
            "downloads": -1,
            "filename": "langchain_genezio-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f353b92011b796f6917484049f80505e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 4337,
            "upload_time": "2025-02-12T14:19:58",
            "upload_time_iso_8601": "2025-02-12T14:19:58.753423Z",
            "url": "https://files.pythonhosted.org/packages/8d/79/155ae70ee6ac68ee3d05233d8123d72e132adcc97987b71552930bad6185/langchain_genezio-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "044020ae60255c1e1a7b74919a06f6d254c00d3e4a16d07280977ea6a574ab31",
                "md5": "5db01c856a97ad77561a65893cee3d2c",
                "sha256": "2055c48335f82eea40aba8df2f5d818100371d618ec486e4f33c10b2756c6cde"
            },
            "downloads": -1,
            "filename": "langchain_genezio-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "5db01c856a97ad77561a65893cee3d2c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 3647,
            "upload_time": "2025-02-12T14:19:59",
            "upload_time_iso_8601": "2025-02-12T14:19:59.950924Z",
            "url": "https://files.pythonhosted.org/packages/04/40/20ae60255c1e1a7b74919a06f6d254c00d3e4a16d07280977ea6a574ab31/langchain_genezio-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-12 14:19:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Genez-io",
    "github_project": "langchain-genezio",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "langchain-genezio"
}
        
Elapsed time: 0.39850s