快速开始
pip install open-interpreter
终端
安装后,运行 :interpreter
interpreter --api_base http://localhost:8000/v1
、、、、、忽略
下面是一个自动打开环境代码,根据例子修改你的路径和环境名
jupyter notebok
import subprocess
command = ['cmd', '/c', 'start', 'cmd', '/k', 'cd E:\\jupyter-notebook\\jupyter\\XBL\\xuexi && E: && activate yx && python']
subprocess.Popen(command)
以上步骤都可以忽略
、、、、、、忽略
Python
from interpreter import interpreter
interpreter.chat("Plot AAPL and META's normalized stock prices") # 执行单一命令
interpreter.chat() # 开始交互式聊天
输入以下代码,需要根据你的本地模型api进行修改
from interpreter import interpreter
interpreter.llm.api_base = "<custom_endpoint>"
#例子
#interpreter.llm.api_base = "http://localhost:8000/v1"
interpreter.chat("求解类似 10x + 14 = 12 的方程")
# 开始交互式聊天
interpreter.chat()
只试了chatglm3-6b和Qwen-7B系列的