[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

截图

notion image
 

© Ying Bun 2021 - 2024