Stay Hungry,Stay Foolish!

OS-Copilot (open interpreter)

OS-Copilot

https://github.com/OS-Copilot/OS-Copilot

An self-improving embodied conversational agent seamlessly integrated into the operating system to automate our daily tasks.

OS-Copilot is an open-source library to build generalist agents capable of automatically interfacing with comprehensive elements in an operating system (OS), including the web, code terminals, files, multimedia, and various third-party applications.

 

阿里

https://help.aliyun.com/zh/alinux/user-guide/instructions-for-os-copilot

https://developer.aliyun.com/article/1569065#:~:text=OS%20Copil

https://openanolis.cn/blog/detail/1129965695296482635#:~:text=%E4%B8%BA%E4%BA%86%E5%BA%94%E5%AF%B9%E8%BF%99%E4%BA%9B%E6%8C%91%E6%88%98

 

功能介绍

  • 命令行自然语言问答

    通过命令行自然语言问答,OS Copilot可以让用户直接在OS的命令行中输入在使用中的自然语言表述的问题,帮助用户回答日常及操作系统领域相关信息,简化用户需要切换到浏览器搜索的步骤,降低OS使用成本及使用连贯性,提高日常OS使用效率和用户体验。OS Copilot通过后端的LLM大模型,可以让用户轻松地接触到阿里云操作系统团队多年积累的系统领域知识,让用户可以更精准地搜索到操作系统相关信息,特别是对于阿里云自研操作系统Alibaba Cloud Linux及阿里云主导开源社区龙蜥操作系统AnolisOS的相关知识。

  • 辅助命令执行

    不同于Windows可视化的桌面操作系统,Linux操作系统主要通过命令行来进行操作系统日常的使用及维护等操作。而复杂繁多的命令行,对于Linux小白用户来说是入门Linux的第一道门槛。OS Copilot提供辅助命令执行功能,让Linux的小白用户也能迅速上手简单的Linux的使用。

  • 阿里云CLI调用

    阿里云CLI(Command Line Interface)是基于阿里云开放API建立的管理工具。借助此工具,您可以通过调用阿里云开放API来管理阿里云产品。OS Copilot支持让用户在操作系统内完成阿里云CLI的调用,通过命令行简单进行ECS信息及实例ID等查询。

  • 系统运维和调优

    在操作系统使用中的重要场景是系统的运维和调优,操作系统的表现对于业务有着非常大的影响。虽然市面上有很多的相关运维和调优产品,但是系统的运维和调优需要相关人员有相关Linux内核专业知识的积累及长期的问题处理经验,而具备相关能力的人才是非常有限的。Copilot可以通过自然语言调用相关系统运维及调优工具,特别是阿里云自研的系统工具,帮助用户轻松使用系统工具定位系统问题,提升系统性能表现。

 

open-interpreter

https://github.com/OpenInterpreter/open-interpreter

Open Interpreter lets LLMs run code (Python, Javascript, Shell, and more) locally. You can chat with Open Interpreter through a ChatGPT-like interface in your terminal by running $ interpreter after installing.

This provides a natural-language interface to your computer's general-purpose capabilities:

  • Create and edit photos, videos, PDFs, etc.
  • Control a Chrome browser to perform research
  • Plot, clean, and analyze large datasets
  • ...etc.

⚠️ Note: You'll be asked to approve code before it's run.

 

实践

https://docs.openinterpreter.com/getting-started/introduction

https://docs.openinterpreter.com/language-models/local-models/lm-studio

 

interactive_quickstart.py

复制代码
# This is all you need to get started
from interpreter import interpreter

interpreter.offline = True

interpreter.llm.model = "openai/local" # Tells OI to use an OpenAI-compatible server
interpreter.llm.api_key = "dummy_key"
interpreter.llm.api_base = "http://172.20.160.1:1234/v1"
# interpreter.llm.model = "lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf"
interpreter.llm.context_window = 7000
interpreter.llm.max_tokens = 1000
interpreter.llm.supports_functions = False

interpreter.chat()
复制代码

 

https://docs.openinterpreter.com/settings/all-settings#local-mode

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 local models, requires this
interpreter.llm.api_base = "http://localhost:1234/v1" # Point this at any OpenAI compatible server

interpreter.chat()

 

zhipu

复制代码
# This is all you need to get started
from interpreter import interpreter

interpreter.offline = True

interpreter.llm.model = "openai/glm-4" # Tells OI to use an OpenAI-compatible server
interpreter.llm.api_key = "XXXXXX"
interpreter.llm.api_base = "https://open.bigmodel.cn/api/paas/v4/"
# interpreter.llm.model = "lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf"
interpreter.llm.context_window = 7000
interpreter.llm.max_tokens = 1000
interpreter.llm.supports_functions = False

interpreter.chat()
复制代码

 

 

prerequisite:

enter direcotry:

/home/song/workspace/open-interpreter/examples

 

task:

please list all files in the current directory.

copy the files which name contains "local" word in the current work directory to the target directory "/home/song/workspace/copiedlocal".

 

 

 

 

 

 

案例

https://blog.csdn.net/shebao3333/article/details/135494919

2.1 可视化全球变暖趋势

我们将从 ChatGPT 的数据分析用例之一开始,要求 Open Interpreter 可视化 1961 年至 2022 年平均温度变化的数据集。

提示词:

    Plot a heatmap of the global warming trends for each of the European Union countries using the dataset at https://opendata.arcgis.com/datasets/4063314923d74187be9596f10d034914_0.csv . Put countries on the y-axis and years on the x-axis.

 

https://blog.csdn.net/gitblog_00789/article/details/141049350

数据可视化:使用Open Interpreter解析和绘制大型CSV或JSON数据文件。
自动化脚本:创建自定义脚本以定期备份文件或自动执行重复性任务。
网页互动:通过控制Chrome浏览器自动填写表单,进行网络爬虫或数据分析。
安全提醒:始终对可能修改文件或系统设置的命令保持警惕,确保安全运行。

 

https://zhuanlan.zhihu.com/p/655719282

请总结一下这篇文章,用中文输出:

 

项目 Open Interpreter Code Interpreter (ChatGPT)
上网 在本地工作,完全可访问 基于云托管,访问受限
可用软件包 可以使用任何包或库 仅预安装
执行时间和文件大小 无限制 有限的运行时间和文件大小
安全 需要用户确认以防止恶意代码 不同的用户验证流程
收费 免费(开源) $ 20 /月(付费计划)
支持各种编程语言 Python、JavaScript、Bash 等 仅限Python

 

今天早上发布的 Open Interpreter v0.1.2 可以通过一个命令设置大多数 HuggingFace 模型以供离线使用。 它是本地的、私人的且免费的。

$ pip install --upgrade open-interpreter
$ interpreter --model tiiuae/falcon-180B
动图
 

 

https://blog.csdn.net/javastart/article/details/135031453

 

 

3 excel 文件合并

处理数据时我们经常会遇到这样的情况:由于数据库导出限制或者其他原因,一个完整的数据集被拆分为多个小的数据集分开存储,而数据分析时我们需要将小的数据集合并。这类任务使用 open-interpreter 也可以轻松完成。

 

2 pdf 文件批量转换

数据处理过程中经常会遇到一些以 pdf 格式存储的表格,使用 Python 可以将这些表格储存为 excel 格式。现在文件夹中有四个 pdf 文件,我们向 open-interpreter 发出指令让它把其中的表格提取出来,并以 excel 格式储存。


————————————————

 

 

 

1获取网页内容

open-interpreter 最引人注目的特点是支持联网,我们首先让它尝试读取和理解网页的内容。我们索性让它读取 open-interpreter 项目所在的 Github 网址,来一个简单的“自我介绍”。

首先,我们使用开启命令运行 open-interpreter(这里使用的是 GPT-4 模型),然后向它提问“这个Github项目的主要内容是什么?https://github.com/KillianLucas/open-interpreter”,之后 AI 给出了相应的解决步骤以及 Python 代码:

 
————————————————

 

posted @   lightsong  阅读(50)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
· 全程使用 AI 从 0 到 1 写了个小工具
· 从文本到图像:SSE 如何助力 AI 内容实时呈现?(Typescript篇)
千山鸟飞绝,万径人踪灭
点击右上角即可分享
微信分享提示