跳到正文
Hacker News· sepokroce·· 9 天前AI 评分22

用 LM Studio 作为 Firefox 聊天机器人

Using LM Studio as a Chatbot in Firefox

AI 导读

开发者发布 Firefox 开源插件 Ask LM Studio,让用户在侧边栏与本地 LM Studio 服务器上的任意已加载 LLM 对话,数据默认不离开本机。插件提供 Summarize、Quiz me、Explain this、Proofread 四项操作,可设置 API Base URL、模型、System prompt 与 Temperature,并支持关闭右键菜单入口。

正文 · 原文

I use the chatbot feature in Firefox on a daily basis, especially Proofread. However, the list of available chatbots cannot be extended. In fact, it’s a hardcoded list of providers, tied to Firefox prefs/Enterprise Policy. That is a big problem if you want to remain anonymous and lets say, try to use LM Studio as a chatbot provider in Firefox, with a custom local LLM.

So, I thought maybe I can build an add-on for that. It must be complementary with the Firefox core chatbot experience, look and feel as similar as possible to the other chatbots and based on all of the standard UI patterns for these types of user interfaces.

Introducing Ask LM Studio

Ask LM Studio is a Firefox add-on that lets you chat with local models in the sidebar. The chatbot experience is local-first, meaning that no data leaves your machine, unless you run the LM Studio server on an external host. By default, the add-on uses your local LM Studio server and works with any loaded LLM. It offers the same four basic actions available with the built-in chatbots, that is:

  • Summarize
  • Quiz me
  • Explain this
  • Proofread

Just select the text you want to process or right click the page you are on, and select an action.

The add-on is very light-weight and even though I wanted to keep all of the configuration options outside of Firefox, there are some add-on settings available like:

  • Base URL to LM Studio API
  • Preferred chatbot model
  • System prompt
  • Temperature

Also, If you don’t need “Ask LM Studio” in the right-click menu, you can just toggle the associated setting.

The add-on is open source and available on GitHub. Make sure you check the source code if you’re curious about its mechanics.

I will probably add some additional actions in the future, so if you have any specific ideas or requests, let me know.

来源:Hacker News · gocemitevski.com