[AI] Open Interpreter
date
Feb 22, 2024
slug
ai-open-interpreter
status
Published
summary
AGI技能
tags
ai
type
Post
URL
Summary
安装过程
pip install open-interpreter
### Terminal
#After installation, simply run interpreter:
interpreter
# auto-run
interpreter -y
# gpt-4-1106-preview
# gpt-4
interpreter --model gpt-3.5-turbo
interpreter --model claude-2
interpreter --model command-nightly
### Python
from interpreter import interpreter
interpreter.chat("Plot AAPL and META's normalized stock prices") # Executes a single command
interpreter.chat() # Starts an interactive chat
interpreter.chat("Get the last 5 BBC news headlines.")
# default.yaml
interpreter --profiles
Running Open Interpreter locally
interpreter --local
from interpreter import interpreter
interpreter.offline = True # Disables online features like Open Procedures
interpreter.llm.model = "openai/x" # Tells OI to send messages in OpenAI's format
interpreter.llm.api_key = "fake_key" # LiteLLM, which we use to talk to LM Studio, requires this
interpreter.llm.api_base = "http://localhost:1234/v1" # Point this at any OpenAI compatible server
interpreter.chat()
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F79e99652-d5b9-4f77-b4a7-df11d59c6483%2Fcd8c3a98-1bf0-458e-8518-cb1eb17a21ad%2FUntitled.jpeg?table=block&id=a2a60e62-ac42-48b7-a622-3bc51c8907c4&cache=v2)
截图
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F79e99652-d5b9-4f77-b4a7-df11d59c6483%2F817fe5e5-48e8-46fa-b90d-87386e6d238a%2FUntitled.jpeg?table=block&id=42ba3cea-efe2-4d44-b5df-6bf4373d4587&cache=v2)