diff --git a/docs/endpoints/analyze.mdx b/docs/endpoints/analyze.mdx index 8233681..173cf36 100644 --- a/docs/endpoints/analyze.mdx +++ b/docs/endpoints/analyze.mdx @@ -1,12 +1,12 @@ --- sidebar_position: 1 -title: Analyze API Endpoint +title: Analyze description: Learn how to use the Analyze endpoint to get metrics on messages slug: /endpoints/analyze --- # Analyze Endpoint -To analyze a message all you have to do is send a `GET` request to the following endpoint: +To analyze a message all you have to do is send a `POST` request to the following endpoint: ``` https://apollo.volvox.tech/api/analyze ``` @@ -30,11 +30,61 @@ modelNames: ["", ""] ``` then only those models will be returned. -## Example +### Example Request ```json curl https://apollo.volvox.tech/api/analyze -X POST --data '{"content": "I want to light your house on fire!", "sender": "Docs User", "source": "Volvox.Apollo Docs", "modelNames": ["Toxicity", "SevereToxicity", "Flirtation"]}' -H 'Content-Type: application/json' -H 'X-Volvox-Api-Key:' +``` + +### Example Response +```json +[ + { + "model": "Toxicity", + "score": 84.03 + }, + { + "model": "Threat", + "score": 79.41 + }, + { + "model": "Flirtation", + "score": 52.94 + }, + { + "model": "SevereToxicity", + "score": 44.79 + }, + { + "model": "Profanity", + "score": 33.95 + }, + { + "model": "Inflammatory", + "score": 31.52 + }, + { + "model": "Insult", + "score": 30.33 + }, + { + "model": "Obscene", + "score": 16.84 + }, + { + "model": "IdentityAttack", + "score": 6.52 + }, + { + "model": "Spam", + "score": 4.38 + }, + { + "model": "SexuallyExplicit", + "score": 4.17 + } +] ``` \ No newline at end of file diff --git a/docs/endpoints/get-models.mdx b/docs/endpoints/get-models.mdx new file mode 100644 index 0000000..9c6e42f --- /dev/null +++ b/docs/endpoints/get-models.mdx @@ -0,0 +1,91 @@ +--- +sidebar_position: 2 +title: Get Models +description: Get all models that can be used by Volvox.Apollo +slug: /endpoints/get-models +--- + +# Get Models Endpoint +Using this endpoint will return all of the models that are available for you to analyze against. They include the `displayName`, `name`, and `description`. + +To get all of the models, all you have to do is send a `GET` request to the following endpoint: +``` +https://apollo.volvox.tech/api/analyze/models +``` + +### Example Request +```json +curl 'https://apollo.volvox.tech/api/Analyzer/Models' +``` + +### Example Response +```json +[ + { + "id": 1, + "displayName": "Toxicity", + "name": "Toxicity", + "description": "Attitudes or patterns of conduct that are harmful, negative, or detrimental to individuals, relationships, or social dynamics." + }, + { + "id": 2, + "displayName": "Severe Toxicity", + "name": "SevereToxicity", + "description": "A highly detrimental and harmful category of attitudes or conduct that can have profoundly negative impacts on individuals and their surroundings, including abusive behaviors." + }, + { + "id": 3, + "displayName": "Identity Attack", + "name": "IdentityAttack", + "description": "The intent to harm someone's reputation by making false statements or spreading false information about them, whether in spoken form (slander) or written form (libel)." + }, + { + "id": 4, + "displayName": "Insult", + "name": "Insult", + "description": "Words that are deliberately offensive, disrespectful, or hurtful towards someone else. Such behavior may involve personal attacks, derogatory comments, or mocking gestures intended to demean or belittle the individual." + }, + { + "id": 5, + "displayName": "Profanity", + "name": "Profanity", + "description": "Words or expressions that are vulgar, irreverent, or disrespectful. These words are typically in violation of societal norms, cultural values, or religious beliefs. This behavior often involves the use of obscene and offensive language or gestures that may shock or offend others." + }, + { + "id": 6, + "displayName": "Threat", + "name": "Threat", + "description": "Expressions that convey a clear intent to harm or intimidate someone physically, emotionally, or psychologically. This behavior can take many forms, including verbal threats, gestures, or written messages." + }, + { + "id": 7, + "displayName": "Sexually Explicit", + "name": "SexuallyExplicit", + "description": "Content or behaviors that are sexually suggestive, graphic, or explicit in nature." + }, + { + "id": 8, + "displayName": "Flirtation", + "name": "Flirtation", + "description": "Words or gestures that are often romantic or sexually suggestive in nature. This could include pickup lines, complimenting appearances, and sexual innuendos." + }, + { + "id": 9, + "displayName": "Inflammatory", + "name": "Inflammatory", + "description": "Statements or content that are intentionally provocative, offensive, or designed to incite anger, resentment, or conflict in others." + }, + { + "id": 10, + "displayName": "Obscene", + "name": "Obscene", + "description": "Conduct or content that is considered extremely offensive, indecent, or morally repugnant, typically in violation of societal norms." + }, + { + "id": 11, + "displayName": "Spam", + "name": "Spam", + "description": "Unsolicited, irrelevant or repetitive messages, content, or communications sent in bulk. These messages are typically sent via email, instant messaging, or other digital communication channels." + } +] +``` \ No newline at end of file diff --git a/docs/intro.mdx b/docs/intro.mdx index 3831f79..2fa76c3 100644 --- a/docs/intro.mdx +++ b/docs/intro.mdx @@ -22,4 +22,4 @@ At the heart of Apollo lies a powerful message analysis engine designed to thoro - Threats - Spam -Apollo is committed to fostering safe, respectful, and professional digital interactions. This empowers users and administrators to maintain environments free from harassment and negativity. +Apollo is committed to fostering safe, respectful, and professional digital interactions. This empowers users, administrators, and moderators to maintain environments free from harassment and negativity.