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 User1 User
必須使用 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.
由 1 位評論者給出 0 分
登入後即可幫此擴充套件評分
目前沒有評分

已儲存星等

5
0
4
0
3
0
2
0
1
0
還沒有評論
更多資訊
版本
1.0
大小
1.33 MB
最近更新
2 個月前 (2025年6月20日)
相關分類
  • 語言支援
授權條款
MIT License
版本紀錄
  • 瀏覽所有版本
新增至收藏集
檢舉此附加元件
dishdare 製作的更多擴充套件
  • 目前沒有評分

  • 目前沒有評分

  • 目前沒有評分

  • 目前沒有評分

  • 目前沒有評分

  • 目前沒有評分

前往 Mozilla 官網

附加元件

  • 關於
  • Firefox 附加元件部落格
  • 擴充套件工作坊
  • 開發者交流中心
  • 開發者政策
  • 社群部落格
  • 討論區
  • 回報 Bug
  • 評論撰寫指南

瀏覽器

  • Desktop
  • Mobile
  • Enterprise

產品

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

除另有註明外,本站內容皆採用創用 CC 姓名標示—相同方式分享條款 3.0 或更新版本授權大眾使用。