summaryrefslogblamecommitdiffstats
path: root/testing/aiservice/testing.py
blob: 5cb6c5ef01a4f855e3c7f4f91ee8edd4f7ffa5d1 (plain) (tree)





























                                                                                                    
from AiService import ChatCompletion

# Test 1
response = ChatCompletion.create(model="gpt-3.5-turbo",
                                 provider="AiService",
                                 stream=False,
                                 messages=[{'role': 'user', 'content': 'who are you?'}])

print(response)

# Test 2
response = ChatCompletion.create(model="gpt-3.5-turbo",
                                 provider="AiService",
                                 stream=False,
                                 messages=[{'role': 'user', 'content': 'what you can do?'}])

print(response)


# Test 3
response = ChatCompletion.create(model="gpt-3.5-turbo",
                                 provider="AiService",
                                 stream=False,
                                 messages=[
                                     {'role': 'user', 'content': 'now your name is Bob'},
                                     {'role': 'assistant', 'content': 'Hello Im Bob, you asistant'},
                                     {'role': 'user', 'content': 'what your name again?'},
                                 ])

print(response)