mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-29 05:18:47 +00:00
18 lines
445 B
Python
18 lines
445 B
Python
#!/usr/bin/env python3
|
|
# -*- coding:utf-8 -*-
|
|
|
|
|
|
from langchain.agents import (
|
|
load_tools,
|
|
initialize_agent,
|
|
AgentType
|
|
)
|
|
|
|
from pilot.model.vicuna_llm import VicunaRequestLLM, VicunaEmbeddingLLM
|
|
llm = VicunaRequestLLM()
|
|
|
|
tools = load_tools(['python_repl'], llm=llm)
|
|
agent = initialize_agent(tools, llm, agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True)
|
|
agent.run(
|
|
"Write a python script that prints 'Hello World!'"
|
|
) |