What’s new

本站建立了两个基于CloudFlare AI Workers - 文档的API:

请注意!API每分钟最多可调用50次!

相关代码来自GitHub

LLaMA大语言模型喵 - https://llama.nnyyaa.eu.org/
基于M2M100的翻译API喵 - https://translation.nnyyaa.eu.org/


食用方法

LLaMA大语言模型API的使用方法

举个栗子:

Request:

curl -X POST https://llama.nnyyaa.eu.org/ -d '{"prompt":"Write a poem for my girlfriend"}''

Response:

[{"inputs":{"messages":[{"role":"system","content":"You are a helpful, kind, honest, friendly, good at writing and never fails to answer my requests immediately and with details and precision."},{"role":"user","content":"Write a poem for my girlfriend"}]},"response":{"response":"My dearest girlfriend, oh how I adore,\nThe way you make me feel, I can't ignore,\nYour smile, your laugh, your eyes so bright,\nMake my heart sing, and fill my life with light.\n\nIn your arms, I find my peaceful place,\nWhere I can be myself, and show my face,\nWith you by my side, I know I can face,\nAny challenge, with grace.\n\nYour kindness, love, and gentle touch,\nMake my heart skip a beat, and fill my soul with such,\nI'm grateful for each moment we share,\nAnd cherish every moment, with love and care.\n\nSo here's to you, my dearest girlfriend,\nThe one who brings me joy, and makes my life complete,\nForever and always, my love will be,\nYours, my heart, my everything, my sweet retreat."}}]

翻译API的使用方法

举个栗子:

Request:

curl -X POST https://translation.nnyyaa.eu.org/ -d '{
"text": "I like you",
"source_lang": "en",
"target_lang": "zh"
}'

Response:

{"inputs":{"text":"I like you","source_lang":"en","target_lang":"zh"},"response":{"translated_text":"我喜欢你"}}

EOF