Spaces:
Sleeping
Sleeping
Update agents.py
Browse files
agents.py
CHANGED
|
@@ -281,14 +281,14 @@ class Llama2:
|
|
| 281 |
await self.startClient(clientPort)
|
| 282 |
|
| 283 |
async def ask_Forefront(self, question):
|
| 284 |
-
api = "
|
| 285 |
forefront = ForefrontAI(api)
|
| 286 |
response = await forefront.handleInput(question)
|
| 287 |
print(response)
|
| 288 |
return response
|
| 289 |
-
|
| 290 |
async def ask_Claude(self, question):
|
| 291 |
-
api = "
|
| 292 |
claude = Claude3(api)
|
| 293 |
response = await claude.handleInput(question)
|
| 294 |
print(response)
|
|
@@ -450,7 +450,7 @@ class Llama2:
|
|
| 450 |
|
| 451 |
async def ask_chaindesk(self):
|
| 452 |
id = "clhet2nit0000eaq63tf25789"
|
| 453 |
-
|
| 454 |
response = await agent.handleInput(question)
|
| 455 |
print(response)
|
| 456 |
return response
|
|
@@ -871,7 +871,7 @@ class Copilot:
|
|
| 871 |
|
| 872 |
async def ask_chaindesk(self):
|
| 873 |
id = "clhet2nit0000eaq63tf25789"
|
| 874 |
-
|
| 875 |
response = await agent.handleInput(question)
|
| 876 |
print(response)
|
| 877 |
return response
|
|
@@ -900,28 +900,28 @@ class Copilot:
|
|
| 900 |
|
| 901 |
async def askCharacter(self, question):
|
| 902 |
characterID = await self.pickCharacter(question)
|
| 903 |
-
token = "
|
| 904 |
character = CharacterAI(token, characterID)
|
| 905 |
answer = await character.handleInput(question)
|
| 906 |
return answer
|
| 907 |
|
| 908 |
async def ask_Forefront(self, question):
|
| 909 |
-
api = "
|
| 910 |
forefront = ForefrontAI(api)
|
| 911 |
response = await forefront.handleInput(question)
|
| 912 |
print(response)
|
| 913 |
return response
|
| 914 |
-
|
| 915 |
async def ask_Claude(self, question):
|
| 916 |
-
api = "
|
| 917 |
claude = Claude3(api)
|
| 918 |
response = await claude.handleInput(question)
|
| 919 |
print(response)
|
| 920 |
return response
|
| 921 |
|
| 922 |
async def askLlama(self, question):
|
| 923 |
-
api = "
|
| 924 |
-
llama =
|
| 925 |
response = await llama.handleInput(question)
|
| 926 |
print(response)
|
| 927 |
return response
|
|
@@ -1360,7 +1360,7 @@ class ChatGPT:
|
|
| 1360 |
|
| 1361 |
async def ask_chaindesk(self):
|
| 1362 |
id = "clhet2nit0000eaq63tf25789"
|
| 1363 |
-
|
| 1364 |
response = await agent.handleInput(question)
|
| 1365 |
print(response)
|
| 1366 |
return response
|
|
@@ -1389,27 +1389,27 @@ class ChatGPT:
|
|
| 1389 |
|
| 1390 |
async def askCharacter(self, question):
|
| 1391 |
characterID = await self.pickCharacter(question)
|
| 1392 |
-
token = "
|
| 1393 |
character = CharacterAI(token, characterID)
|
| 1394 |
answer = await character.handleInput(question)
|
| 1395 |
return answer
|
| 1396 |
|
| 1397 |
async def ask_Forefront(self, question):
|
| 1398 |
-
api = "
|
| 1399 |
forefront = ForefrontAI(api)
|
| 1400 |
response = await forefront.handleInput(question)
|
| 1401 |
print(response)
|
| 1402 |
return response
|
| 1403 |
|
| 1404 |
async def ask_Claude(self, question):
|
| 1405 |
-
api = "
|
| 1406 |
claude = Claude3(api)
|
| 1407 |
response = await claude.handleInput(question)
|
| 1408 |
print(response)
|
| 1409 |
return response
|
| 1410 |
|
| 1411 |
async def askLlama(self, question):
|
| 1412 |
-
api = "
|
| 1413 |
llama = AgentLlama2(api)
|
| 1414 |
response = await llama.handleInput(question)
|
| 1415 |
print(response)
|
|
@@ -1811,7 +1811,7 @@ class Claude3:
|
|
| 1811 |
|
| 1812 |
async def ask_chaindesk(self):
|
| 1813 |
id = "clhet2nit0000eaq63tf25789"
|
| 1814 |
-
|
| 1815 |
response = await agent.handleInput(question)
|
| 1816 |
print(response)
|
| 1817 |
return response
|
|
@@ -1840,21 +1840,21 @@ class Claude3:
|
|
| 1840 |
|
| 1841 |
async def askCharacter(self, question):
|
| 1842 |
characterID = await self.pickCharacter(question)
|
| 1843 |
-
token = "
|
| 1844 |
character = CharacterAI(token, characterID)
|
| 1845 |
answer = await character.handleInput(question)
|
| 1846 |
return answer
|
| 1847 |
|
| 1848 |
async def ask_Forefront(self, question):
|
| 1849 |
-
api = "
|
| 1850 |
forefront = ForefrontAI(api)
|
| 1851 |
response = await forefront.handleInput(question)
|
| 1852 |
print(response)
|
| 1853 |
return response
|
| 1854 |
|
| 1855 |
async def askLlama(self, question):
|
| 1856 |
-
api = "
|
| 1857 |
-
llama =
|
| 1858 |
response = await llama.handleInput(question)
|
| 1859 |
print(response)
|
| 1860 |
return response
|
|
@@ -2271,7 +2271,7 @@ class ForefrontAI:
|
|
| 2271 |
|
| 2272 |
async def ask_chaindesk(self):
|
| 2273 |
id = "clhet2nit0000eaq63tf25789"
|
| 2274 |
-
|
| 2275 |
response = await agent.handleInput(question)
|
| 2276 |
print(response)
|
| 2277 |
return response
|
|
@@ -2300,21 +2300,21 @@ class ForefrontAI:
|
|
| 2300 |
|
| 2301 |
async def askCharacter(self, question):
|
| 2302 |
characterID = await self.pickCharacter(question)
|
| 2303 |
-
token = "
|
| 2304 |
character = CharacterAI(token, characterID)
|
| 2305 |
answer = await character.handleInput(question)
|
| 2306 |
return answer
|
| 2307 |
-
|
| 2308 |
async def ask_Claude(self, question):
|
| 2309 |
-
api = "
|
| 2310 |
claude = Claude3(api)
|
| 2311 |
response = await claude.handleInput(question)
|
| 2312 |
print(response)
|
| 2313 |
return response
|
| 2314 |
|
| 2315 |
async def askLlama(self, question):
|
| 2316 |
-
api = "
|
| 2317 |
-
llama =
|
| 2318 |
response = await llama.handleInput(question)
|
| 2319 |
print(response)
|
| 2320 |
return response
|
|
@@ -2678,27 +2678,27 @@ class CharacterAI:
|
|
| 2678 |
|
| 2679 |
async def ask_chaindesk(self):
|
| 2680 |
id = "clhet2nit0000eaq63tf25789"
|
| 2681 |
-
|
| 2682 |
response = await agent.handleInput(question)
|
| 2683 |
print(response)
|
| 2684 |
return response
|
| 2685 |
|
| 2686 |
async def ask_Forefront(self, question):
|
| 2687 |
-
api = "
|
| 2688 |
forefront = ForefrontAI(api)
|
| 2689 |
response = await forefront.handleInput(question)
|
| 2690 |
print(response)
|
| 2691 |
return response
|
| 2692 |
|
| 2693 |
async def ask_Claude(self, question):
|
| 2694 |
-
api = "
|
| 2695 |
claude = Claude3(api)
|
| 2696 |
response = await claude.handleInput(question)
|
| 2697 |
print(response)
|
| 2698 |
return response
|
| 2699 |
|
| 2700 |
async def askLlama(self, question):
|
| 2701 |
-
api = "
|
| 2702 |
llama = AgentLlama2(api)
|
| 2703 |
response = await llama.handleInput(question)
|
| 2704 |
print(response)
|
|
@@ -3089,27 +3089,27 @@ class Chaindesk:
|
|
| 3089 |
|
| 3090 |
async def askCharacter(self, question):
|
| 3091 |
characterID = await self.pickCharacter(question)
|
| 3092 |
-
token = "
|
| 3093 |
character = CharacterAI(token, characterID)
|
| 3094 |
answer = await character.handleInput(question)
|
| 3095 |
return answer
|
| 3096 |
|
| 3097 |
async def ask_Forefront(self, question):
|
| 3098 |
-
api = "
|
| 3099 |
forefront = ForefrontAI(api)
|
| 3100 |
response = await forefront.handleInput(question)
|
| 3101 |
print(response)
|
| 3102 |
return response
|
| 3103 |
|
| 3104 |
async def ask_Claude(self, question):
|
| 3105 |
-
api = "
|
| 3106 |
claude = Claude3(api)
|
| 3107 |
response = await claude.handleInput(question)
|
| 3108 |
print(response)
|
| 3109 |
return response
|
| 3110 |
|
| 3111 |
async def askLlama(self, question):
|
| 3112 |
-
api = "
|
| 3113 |
llama = AgentLlama2(api)
|
| 3114 |
response = await llama.handleInput(question)
|
| 3115 |
print(response)
|
|
@@ -3471,7 +3471,7 @@ class Flowise:
|
|
| 3471 |
|
| 3472 |
async def ask_chaindesk(self):
|
| 3473 |
id = "clhet2nit0000eaq63tf25789"
|
| 3474 |
-
|
| 3475 |
response = await agent.handleInput(question)
|
| 3476 |
print(response)
|
| 3477 |
return response
|
|
@@ -3500,27 +3500,27 @@ class Flowise:
|
|
| 3500 |
|
| 3501 |
async def askCharacter(self, question):
|
| 3502 |
characterID = await self.pickCharacter(question)
|
| 3503 |
-
token = "
|
| 3504 |
character = CharacterAI(token, characterID)
|
| 3505 |
answer = await character.handleInput(question)
|
| 3506 |
return answer
|
| 3507 |
|
| 3508 |
async def ask_Forefront(self, question):
|
| 3509 |
-
api = "
|
| 3510 |
forefront = ForefrontAI(api)
|
| 3511 |
response = await forefront.handleInput(question)
|
| 3512 |
print(response)
|
| 3513 |
return response
|
| 3514 |
|
| 3515 |
async def ask_Claude(self, question):
|
| 3516 |
-
api = "
|
| 3517 |
claude = Claude3(api)
|
| 3518 |
response = await claude.handleInput(question)
|
| 3519 |
print(response)
|
| 3520 |
return response
|
| 3521 |
|
| 3522 |
async def askLlama(self, question):
|
| 3523 |
-
api = "
|
| 3524 |
llama = AgentLlama2(api)
|
| 3525 |
response = await llama.handleInput(question)
|
| 3526 |
print(response)
|
|
|
|
| 281 |
await self.startClient(clientPort)
|
| 282 |
|
| 283 |
async def ask_Forefront(self, question):
|
| 284 |
+
api = os.environ["FOREFRONT_API_KEY"]
|
| 285 |
forefront = ForefrontAI(api)
|
| 286 |
response = await forefront.handleInput(question)
|
| 287 |
print(response)
|
| 288 |
return response
|
| 289 |
+
|
| 290 |
async def ask_Claude(self, question):
|
| 291 |
+
api = os.environ["ANTHROPIC_API_KEY"]
|
| 292 |
claude = Claude3(api)
|
| 293 |
response = await claude.handleInput(question)
|
| 294 |
print(response)
|
|
|
|
| 450 |
|
| 451 |
async def ask_chaindesk(self):
|
| 452 |
id = "clhet2nit0000eaq63tf25789"
|
| 453 |
+
agent = Chaindesk(id)
|
| 454 |
response = await agent.handleInput(question)
|
| 455 |
print(response)
|
| 456 |
return response
|
|
|
|
| 871 |
|
| 872 |
async def ask_chaindesk(self):
|
| 873 |
id = "clhet2nit0000eaq63tf25789"
|
| 874 |
+
agent = Chaindesk(id)
|
| 875 |
response = await agent.handleInput(question)
|
| 876 |
print(response)
|
| 877 |
return response
|
|
|
|
| 900 |
|
| 901 |
async def askCharacter(self, question):
|
| 902 |
characterID = await self.pickCharacter(question)
|
| 903 |
+
token = os.environ["CHARACTERAI_API_KEY"]
|
| 904 |
character = CharacterAI(token, characterID)
|
| 905 |
answer = await character.handleInput(question)
|
| 906 |
return answer
|
| 907 |
|
| 908 |
async def ask_Forefront(self, question):
|
| 909 |
+
api = os.environ["FOREFRONT_API_KEY"]
|
| 910 |
forefront = ForefrontAI(api)
|
| 911 |
response = await forefront.handleInput(question)
|
| 912 |
print(response)
|
| 913 |
return response
|
| 914 |
+
|
| 915 |
async def ask_Claude(self, question):
|
| 916 |
+
api = os.environ["ANTHROPIC_API_KEY"]
|
| 917 |
claude = Claude3(api)
|
| 918 |
response = await claude.handleInput(question)
|
| 919 |
print(response)
|
| 920 |
return response
|
| 921 |
|
| 922 |
async def askLlama(self, question):
|
| 923 |
+
api = os.environ["FIREWORKS_API_KEY"]
|
| 924 |
+
llama = AgentLlama2(api)
|
| 925 |
response = await llama.handleInput(question)
|
| 926 |
print(response)
|
| 927 |
return response
|
|
|
|
| 1360 |
|
| 1361 |
async def ask_chaindesk(self):
|
| 1362 |
id = "clhet2nit0000eaq63tf25789"
|
| 1363 |
+
agent = Chaindesk(id)
|
| 1364 |
response = await agent.handleInput(question)
|
| 1365 |
print(response)
|
| 1366 |
return response
|
|
|
|
| 1389 |
|
| 1390 |
async def askCharacter(self, question):
|
| 1391 |
characterID = await self.pickCharacter(question)
|
| 1392 |
+
token = os.environ["CHARACTERAI_API_KEY"]
|
| 1393 |
character = CharacterAI(token, characterID)
|
| 1394 |
answer = await character.handleInput(question)
|
| 1395 |
return answer
|
| 1396 |
|
| 1397 |
async def ask_Forefront(self, question):
|
| 1398 |
+
api = os.environ["FOREFRONT_API_KEY"]
|
| 1399 |
forefront = ForefrontAI(api)
|
| 1400 |
response = await forefront.handleInput(question)
|
| 1401 |
print(response)
|
| 1402 |
return response
|
| 1403 |
|
| 1404 |
async def ask_Claude(self, question):
|
| 1405 |
+
api = os.environ["ANTHROPIC_API_KEY"]
|
| 1406 |
claude = Claude3(api)
|
| 1407 |
response = await claude.handleInput(question)
|
| 1408 |
print(response)
|
| 1409 |
return response
|
| 1410 |
|
| 1411 |
async def askLlama(self, question):
|
| 1412 |
+
api = os.environ["FIREWORKS_API_KEY"]
|
| 1413 |
llama = AgentLlama2(api)
|
| 1414 |
response = await llama.handleInput(question)
|
| 1415 |
print(response)
|
|
|
|
| 1811 |
|
| 1812 |
async def ask_chaindesk(self):
|
| 1813 |
id = "clhet2nit0000eaq63tf25789"
|
| 1814 |
+
agent = Chaindesk(id)
|
| 1815 |
response = await agent.handleInput(question)
|
| 1816 |
print(response)
|
| 1817 |
return response
|
|
|
|
| 1840 |
|
| 1841 |
async def askCharacter(self, question):
|
| 1842 |
characterID = await self.pickCharacter(question)
|
| 1843 |
+
token = os.environ["CHARACTERAI_API_KEY"]
|
| 1844 |
character = CharacterAI(token, characterID)
|
| 1845 |
answer = await character.handleInput(question)
|
| 1846 |
return answer
|
| 1847 |
|
| 1848 |
async def ask_Forefront(self, question):
|
| 1849 |
+
api = os.environ["FOREFRONT_API_KEY"]
|
| 1850 |
forefront = ForefrontAI(api)
|
| 1851 |
response = await forefront.handleInput(question)
|
| 1852 |
print(response)
|
| 1853 |
return response
|
| 1854 |
|
| 1855 |
async def askLlama(self, question):
|
| 1856 |
+
api = os.environ["FIREWORKS_API_KEY"]
|
| 1857 |
+
llama = AgentLlama2(api)
|
| 1858 |
response = await llama.handleInput(question)
|
| 1859 |
print(response)
|
| 1860 |
return response
|
|
|
|
| 2271 |
|
| 2272 |
async def ask_chaindesk(self):
|
| 2273 |
id = "clhet2nit0000eaq63tf25789"
|
| 2274 |
+
agent = Chaindesk(id)
|
| 2275 |
response = await agent.handleInput(question)
|
| 2276 |
print(response)
|
| 2277 |
return response
|
|
|
|
| 2300 |
|
| 2301 |
async def askCharacter(self, question):
|
| 2302 |
characterID = await self.pickCharacter(question)
|
| 2303 |
+
token = os.environ["CHARACTERAI_API_KEY"]
|
| 2304 |
character = CharacterAI(token, characterID)
|
| 2305 |
answer = await character.handleInput(question)
|
| 2306 |
return answer
|
| 2307 |
+
|
| 2308 |
async def ask_Claude(self, question):
|
| 2309 |
+
api = os.environ["ANTHROPIC_API_KEY"]
|
| 2310 |
claude = Claude3(api)
|
| 2311 |
response = await claude.handleInput(question)
|
| 2312 |
print(response)
|
| 2313 |
return response
|
| 2314 |
|
| 2315 |
async def askLlama(self, question):
|
| 2316 |
+
api = os.environ["FIREWORKS_API_KEY"]
|
| 2317 |
+
llama = AgentLlama2(api)
|
| 2318 |
response = await llama.handleInput(question)
|
| 2319 |
print(response)
|
| 2320 |
return response
|
|
|
|
| 2678 |
|
| 2679 |
async def ask_chaindesk(self):
|
| 2680 |
id = "clhet2nit0000eaq63tf25789"
|
| 2681 |
+
agent = Chaindesk(id)
|
| 2682 |
response = await agent.handleInput(question)
|
| 2683 |
print(response)
|
| 2684 |
return response
|
| 2685 |
|
| 2686 |
async def ask_Forefront(self, question):
|
| 2687 |
+
api = os.environ["FOREFRONT_API_KEY"]
|
| 2688 |
forefront = ForefrontAI(api)
|
| 2689 |
response = await forefront.handleInput(question)
|
| 2690 |
print(response)
|
| 2691 |
return response
|
| 2692 |
|
| 2693 |
async def ask_Claude(self, question):
|
| 2694 |
+
api = os.environ["ANTHROPIC_API_KEY"]
|
| 2695 |
claude = Claude3(api)
|
| 2696 |
response = await claude.handleInput(question)
|
| 2697 |
print(response)
|
| 2698 |
return response
|
| 2699 |
|
| 2700 |
async def askLlama(self, question):
|
| 2701 |
+
api = os.environ["FIREWORKS_API_KEY"]
|
| 2702 |
llama = AgentLlama2(api)
|
| 2703 |
response = await llama.handleInput(question)
|
| 2704 |
print(response)
|
|
|
|
| 3089 |
|
| 3090 |
async def askCharacter(self, question):
|
| 3091 |
characterID = await self.pickCharacter(question)
|
| 3092 |
+
token = os.environ["CHARACTERAI_API_KEY"]
|
| 3093 |
character = CharacterAI(token, characterID)
|
| 3094 |
answer = await character.handleInput(question)
|
| 3095 |
return answer
|
| 3096 |
|
| 3097 |
async def ask_Forefront(self, question):
|
| 3098 |
+
api = os.environ["FOREFRONT_API_KEY"]
|
| 3099 |
forefront = ForefrontAI(api)
|
| 3100 |
response = await forefront.handleInput(question)
|
| 3101 |
print(response)
|
| 3102 |
return response
|
| 3103 |
|
| 3104 |
async def ask_Claude(self, question):
|
| 3105 |
+
api = os.environ["ANTHROPIC_API_KEY"]
|
| 3106 |
claude = Claude3(api)
|
| 3107 |
response = await claude.handleInput(question)
|
| 3108 |
print(response)
|
| 3109 |
return response
|
| 3110 |
|
| 3111 |
async def askLlama(self, question):
|
| 3112 |
+
api = os.environ["FIREWORKS_API_KEY"]
|
| 3113 |
llama = AgentLlama2(api)
|
| 3114 |
response = await llama.handleInput(question)
|
| 3115 |
print(response)
|
|
|
|
| 3471 |
|
| 3472 |
async def ask_chaindesk(self):
|
| 3473 |
id = "clhet2nit0000eaq63tf25789"
|
| 3474 |
+
agent = Chaindesk(id)
|
| 3475 |
response = await agent.handleInput(question)
|
| 3476 |
print(response)
|
| 3477 |
return response
|
|
|
|
| 3500 |
|
| 3501 |
async def askCharacter(self, question):
|
| 3502 |
characterID = await self.pickCharacter(question)
|
| 3503 |
+
token = os.environ["CHARACTERAI_API_KEY"]
|
| 3504 |
character = CharacterAI(token, characterID)
|
| 3505 |
answer = await character.handleInput(question)
|
| 3506 |
return answer
|
| 3507 |
|
| 3508 |
async def ask_Forefront(self, question):
|
| 3509 |
+
api = os.environ["FOREFRONT_API_KEY"]
|
| 3510 |
forefront = ForefrontAI(api)
|
| 3511 |
response = await forefront.handleInput(question)
|
| 3512 |
print(response)
|
| 3513 |
return response
|
| 3514 |
|
| 3515 |
async def ask_Claude(self, question):
|
| 3516 |
+
api = os.environ["ANTHROPIC_API_KEY"]
|
| 3517 |
claude = Claude3(api)
|
| 3518 |
response = await claude.handleInput(question)
|
| 3519 |
print(response)
|
| 3520 |
return response
|
| 3521 |
|
| 3522 |
async def askLlama(self, question):
|
| 3523 |
+
api = os.environ["FIREWORKS_API_KEY"]
|
| 3524 |
llama = AgentLlama2(api)
|
| 3525 |
response = await llama.handleInput(question)
|
| 3526 |
print(response)
|