You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding V2 API with support for conciseness, completeness and toxicity checks (#1)
* Adding V2 API with support for conciseness, completeness and toxicity checks.
* Removing prints and updating config for the example application.
* Updating README
---------
Co-authored-by: Preetam Joshi <info@aimon.ai>
# Sends an HTTP POST request to the Aimon Rely Hallucination Detection API with a single dict object containing a valid "context" and "generated_text" but with a very short text and receives a valid response
# Sends an HTTP POST request to the Aimon Rely Hallucination Detection API with a single dict object containing a valid "context" and "generated_text" but with a text containing special characters and receives a valid response
35
39
deftest_special_characters_valid_response(self):
36
40
client=SimpleAimonRelyClient(api_key=API_KEY)
37
41
special_text="!@#$%^&*()_+"
38
42
data_to_send= [{"context": "This is the context", "generated_text": special_text}]
"context": "the abc have reported that those who receive centrelink payments made up half of radio rental's income last year. Centrelink payments themselves were up 20%.",
56
+
"generated_text": "those who receive centrelink payments made up half of radio rental's income last year. The Centrelink payments were 20% up."}]
"context": "the abc have reported that those who receive centrelink payments made up half of radio rental's income last year. Centrelink payments themselves were up 20%.",
71
+
"generated_text": "those who receive centrelink payments made up half of radio rental's income last year. The Centrelink payments were 20% up."}]
data_to_send= [{"context": "the abc have reported that those who receive centrelink payments made up half of radio rental's income last year. Centrelink payments themselves were up 20%.",
85
+
"generated_text": "those who receive centrelink payments made up half of radio rental's income last year. The Centrelink payments were 20% up."}]
0 commit comments