it's free*.ai

llamafile

llamafile 是 Mozilla 的妙招:一個檔案同時是 GGUF 權重和執行環境(llama.cpp 加 Cosmopolitan Libc)。下載、chmod +x、執行。免安裝、免 Python、免 Docker。

llamafile 是 Mozilla 的妙招:一個檔案同時是 GGUF 權重和執行環境(llama.cpp 加 Cosmopolitan Libc)。下載、chmod +x、執行。免安裝、免 Python、免 Docker。

`--server` 會在 8080 埠暴露 OpenAI 相容介面。上下文用啟動參數 -c 設定。想把一個模型當執行檔遞給別人,就用它。

最大上下文
Set with -c at launch
免費額度
無限且私密
註冊要求
什麼都不用 —— 無帳號

端點

基底網址http://localhost:8080/v1
速率限制None — it is your machine

程式碼範例

npm install openai
import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'http://localhost:8080/v1',
  apiKey: 'not-needed'
})

const response = await client.chat.completions.create({
  model: 'LLaMA_CPP',
  messages: [{ role: 'user', content: 'Explain closures in one paragraph.' }]
})

console.log(response.choices[0].message.content)

值得注意

你能免費使用的模型2