Skip to content

Commit 24952fa

Browse files
committed
feat(Endpoints): Add Analyze and Get Models endpoints
This commit adds the Analyze and Get Models endpoints to the documentation. The Analyze endpoint now specifies that a `POST` request should be used instead of a `GET` request. It also includes example requests and responses for both the Analyze and Get Models endpoints. The Get Models endpoint provides information about all available models, including their display names, names, and descriptions. Example requests and responses are included in the documentation. Additionally, the introductory section of the documentation has been updated to emphasize Apollo's commitment to fostering safe, respectful, and professional digital interactions for users, administrators, and moderators.
1 parent fa82c8a commit 24952fa

File tree

3 files changed

+145
-4
lines changed

3 files changed

+145
-4
lines changed

docs/endpoints/analyze.mdx

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
sidebar_position: 1
3-
title: Analyze API Endpoint
3+
title: Analyze
44
description: Learn how to use the Analyze endpoint to get metrics on messages
55
slug: /endpoints/analyze
66
---
77

88
# Analyze Endpoint
9-
To analyze a message all you have to do is send a `GET` request to the following endpoint:
9+
To analyze a message all you have to do is send a `POST` request to the following endpoint:
1010
```
1111
https://apollo.volvox.tech/api/analyze
1212
```
@@ -30,11 +30,61 @@ modelNames: ["<MODEL_NAME>", "<MODEL_NAME>"]
3030
```
3131
then only those models will be returned.
3232

33-
## Example
33+
### Example Request
3434

3535
```json
3636
curl https://apollo.volvox.tech/api/analyze -X POST
3737
--data '{"content": "I want to light your house on fire!", "sender": "Docs User", "source": "Volvox.Apollo Docs", "modelNames": ["Toxicity", "SevereToxicity", "Flirtation"]}'
3838
-H 'Content-Type: application/json'
3939
-H 'X-Volvox-Api-Key:<YOUR_API_KEY>'
40+
```
41+
42+
### Example Response
43+
```json
44+
[
45+
{
46+
"model": "Toxicity",
47+
"score": 84.03
48+
},
49+
{
50+
"model": "Threat",
51+
"score": 79.41
52+
},
53+
{
54+
"model": "Flirtation",
55+
"score": 52.94
56+
},
57+
{
58+
"model": "SevereToxicity",
59+
"score": 44.79
60+
},
61+
{
62+
"model": "Profanity",
63+
"score": 33.95
64+
},
65+
{
66+
"model": "Inflammatory",
67+
"score": 31.52
68+
},
69+
{
70+
"model": "Insult",
71+
"score": 30.33
72+
},
73+
{
74+
"model": "Obscene",
75+
"score": 16.84
76+
},
77+
{
78+
"model": "IdentityAttack",
79+
"score": 6.52
80+
},
81+
{
82+
"model": "Spam",
83+
"score": 4.38
84+
},
85+
{
86+
"model": "SexuallyExplicit",
87+
"score": 4.17
88+
}
89+
]
4090
```

docs/endpoints/get-models.mdx

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
sidebar_position: 2
3+
title: Get Models
4+
description: Get all models that can be used by Volvox.Apollo
5+
slug: /endpoints/get-models
6+
---
7+
8+
# Get Models Endpoint
9+
Using this endpoint will return all of the models that are available for you to analyze against. They include the `displayName`, `name`, and `description`.
10+
11+
To get all of the models, all you have to do is send a `GET` request to the following endpoint:
12+
```
13+
https://apollo.volvox.tech/api/analyze/models
14+
```
15+
16+
### Example Request
17+
```json
18+
curl 'https://apollo.volvox.tech/api/Analyzer/Models'
19+
```
20+
21+
### Example Response
22+
```json
23+
[
24+
{
25+
"id": 1,
26+
"displayName": "Toxicity",
27+
"name": "Toxicity",
28+
"description": "Attitudes or patterns of conduct that are harmful, negative, or detrimental to individuals, relationships, or social dynamics."
29+
},
30+
{
31+
"id": 2,
32+
"displayName": "Severe Toxicity",
33+
"name": "SevereToxicity",
34+
"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."
35+
},
36+
{
37+
"id": 3,
38+
"displayName": "Identity Attack",
39+
"name": "IdentityAttack",
40+
"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)."
41+
},
42+
{
43+
"id": 4,
44+
"displayName": "Insult",
45+
"name": "Insult",
46+
"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."
47+
},
48+
{
49+
"id": 5,
50+
"displayName": "Profanity",
51+
"name": "Profanity",
52+
"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."
53+
},
54+
{
55+
"id": 6,
56+
"displayName": "Threat",
57+
"name": "Threat",
58+
"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."
59+
},
60+
{
61+
"id": 7,
62+
"displayName": "Sexually Explicit",
63+
"name": "SexuallyExplicit",
64+
"description": "Content or behaviors that are sexually suggestive, graphic, or explicit in nature."
65+
},
66+
{
67+
"id": 8,
68+
"displayName": "Flirtation",
69+
"name": "Flirtation",
70+
"description": "Words or gestures that are often romantic or sexually suggestive in nature. This could include pickup lines, complimenting appearances, and sexual innuendos."
71+
},
72+
{
73+
"id": 9,
74+
"displayName": "Inflammatory",
75+
"name": "Inflammatory",
76+
"description": "Statements or content that are intentionally provocative, offensive, or designed to incite anger, resentment, or conflict in others."
77+
},
78+
{
79+
"id": 10,
80+
"displayName": "Obscene",
81+
"name": "Obscene",
82+
"description": "Conduct or content that is considered extremely offensive, indecent, or morally repugnant, typically in violation of societal norms."
83+
},
84+
{
85+
"id": 11,
86+
"displayName": "Spam",
87+
"name": "Spam",
88+
"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."
89+
}
90+
]
91+
```

docs/intro.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ At the heart of Apollo lies a powerful message analysis engine designed to thoro
2222
- Threats
2323
- Spam
2424

25-
Apollo is committed to fostering safe, respectful, and professional digital interactions. This empowers users and administrators to maintain environments free from harassment and negativity.
25+
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.

0 commit comments

Comments
 (0)