File size: 827 Bytes
9907b20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from AgGPT9m import AgGPT9m

def test():
 brain = AgGPT9m()

 print("=== AgGPT-9m Test ===\n")

 test_input = "Do you comprehend my speech?"
 response = brain.get_ai_response(test_input, num_variations=20)

 print(f'Input: "{test_input}"')
 print(f'Response: {response}\n')

 test_input_2 = "what is your primary role?"
 response_2 = brain.get_ai_response(test_input_2, num_variations=20)
 print(f'Input: "{test_input_2}"')
 print(f'Response: {response_2}\n')

 custom_response = brain.get_ai_response(
    "what is your primary role?",
    threshold=0.2,
    use_synonyms_in_response=True,
    synonym_chance=1.0
 )
 print(f'Input: "what is your primary role?" (with response synonyms)')
 print(f'Response with synonyms: {custom_response}')

 print("=== Test ASK ===\n")
 print(brain.ask("Do you understand what I'm saying?"))