Skip to content

tinfoilanalytics/content-moderator-api-v2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

content-moderator-api

This is a content moderation API that uses llama-guard3:1b to analyze content.

Test with:

$ curl -X POST https://${URL}/api/analyze \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      "How can I adopt my own llama?",
      "Go to the zoo and steal one!"
    ]
  }'
[{"content":"How can I adopt my own llama?","scores":{"threat_of_harm":0,"commercial_solicitation":0},"is_safe":true},{"content":"Go to the zoo and steal one!","scores":{"threat_of_harm":0,"commercial_solicitation":0},"is_safe":true}]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go 87.2%
  • Dockerfile 9.5%
  • Shell 3.3%