Firefox 浏览器附加组件
  • 扩展
  • 主题
    • 适用于 Firefox
    • 字典和语言包
    • 其他浏览器网站
    • 适用于 Android 的附加组件
登录
Firellama 预览

Firellama 作者: dishdare

Right-click to summarize a sentence or define a word using locally installed ollama. Sends selected text to your offline ollama system for pop-up window. This is more or less DIY project since most of the things are needed on your local machine.

0 (0 reviews)0 (0 reviews)
1 个用户1 个用户
您需要 Firefox 来使用此扩展
下载 Firefox 并安装扩展
下载文件

扩展元数据

关于此扩展
you need ollama installed on your local machine.
https://ollama.com/download
ollama pull deepseek-r1:1.5b

The addon will use the model deepseek-r1:1.5b installed on your machine.
It summarizes the selected text if it is more than one word or else defines it.

On top of that you need server.py running on your machine.
pip install flask flask_cors

server.py

from flask import Flask, request, jsonify
from flask_cors import CORS
import requests
import re

app = Flask(__name__)
CORS(app)

OLLAMA_URL = "http://localhost:11434/api/generate"
OLLAMA_MODEL = "deepseek-r1:1.5b"

def call_ollama(prompt):
try:
res = requests.post(OLLAMA_URL, json={
"model": OLLAMA_MODEL,
"prompt": prompt,
"stream": False
})
if res.status_code == 200:
result = res.json().get("response", "")
cleaned = re.sub(r"<think>.*?</think>", "", result, flags=re.DOTALL).strip()
return cleaned
else:
return f"⚠️ Ollama error: {res.text}"
except Exception as e:
return f"❌ Error: {str(e)}"

@app.route("/ask", methods=["POST"])
def ask():
data = request.get_json()
prompt = data.get("prompt")
if not prompt:
return jsonify({"error": "Missing prompt"}), 400

result = call_ollama(prompt)
return jsonify({"text": result})

if __name__ == "__main__":
app.run(host="0.0.0.0", port=5005)


Run it at startup with "ollama run deepseek-r1:1.5b" and enjoy the summary.

I usually do ctrl+a of the entire webpage and right-click on Firellama to get the summary.

Special Thanks to ChatGPT.
评分 0(1 位用户)
登录以评价此扩展
目前尚无评分

已保存星级评分

5
0
4
0
3
0
2
0
1
0
尚无评价
更多信息
版本
1.0
大小
1.33 MB
上次更新
2 个月前 (2025年6月20日)
相关分类
  • 语言工具
许可证
MIT 许可证
版本历史
  • 查看所有版本
添加到收藏集
举报此附加组件
dishdare 制作的更多扩展
  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

转至 Mozilla 主页

附加组件

  • 关于
  • Firefox 附加组件博客
  • 扩展工坊
  • 开发者中心
  • 开发者政策
  • 社区博客
  • 论坛
  • 报告缺陷
  • 评价指南

浏览器

  • Desktop
  • Mobile
  • Enterprise

产品

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • 隐私
  • Cookie
  • 法律

除非另有注明,否则本网站上的内容可按知识共享 署名-相同方式共享 3.0 或更新版本使用。