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)
|
|
@@ -396,7 +396,7 @@ class Llama2:
|
|
| 396 |
return follow
|
| 397 |
|
| 398 |
if re.search(r'/askClaude3', response):
|
| 399 |
-
answer4 = await self.
|
| 400 |
outputMsg = st.chat_message("ai")
|
| 401 |
outputMsg.markdown(answer4)
|
| 402 |
follow = await self.handleInput(answer4)
|
|
@@ -415,7 +415,7 @@ class Llama2:
|
|
| 415 |
response = await self.askCharacter(response)
|
| 416 |
outputMsg = st.chat_message("ai")
|
| 417 |
outputMsg.markdown(response)
|
| 418 |
-
follow = await self.handleInput(
|
| 419 |
outputMsg.markdown(follow)
|
| 420 |
return follow
|
| 421 |
|
|
@@ -817,7 +817,7 @@ class Copilot:
|
|
| 817 |
return follow
|
| 818 |
|
| 819 |
if re.search(r'/askClaude3', response):
|
| 820 |
-
answer4 = await self.
|
| 821 |
outputMsg = st.chat_message("ai")
|
| 822 |
outputMsg.markdown(answer4)
|
| 823 |
follow = await self.handleInput(answer4)
|
|
@@ -832,11 +832,11 @@ class Copilot:
|
|
| 832 |
outputMsg.markdown(follow)
|
| 833 |
return follow
|
| 834 |
|
| 835 |
-
if re.search(r'/
|
| 836 |
response = await self.askCharacter(response)
|
| 837 |
outputMsg = st.chat_message("ai")
|
| 838 |
outputMsg.markdown(response)
|
| 839 |
-
follow = await self.handleInput(
|
| 840 |
outputMsg.markdown(follow)
|
| 841 |
return follow
|
| 842 |
|
|
@@ -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
|
|
@@ -1306,7 +1306,7 @@ class ChatGPT:
|
|
| 1306 |
return follow
|
| 1307 |
|
| 1308 |
if re.search(r'/askClaude3', response):
|
| 1309 |
-
answer4 = await self.
|
| 1310 |
outputMsg = st.chat_message("ai")
|
| 1311 |
outputMsg.markdown(answer4)
|
| 1312 |
follow = await self.handleInput(answer4)
|
|
@@ -1321,11 +1321,11 @@ class ChatGPT:
|
|
| 1321 |
outputMsg.markdown(follow)
|
| 1322 |
return follow
|
| 1323 |
|
| 1324 |
-
if re.search(r'/
|
| 1325 |
response = await self.askCharacter(response)
|
| 1326 |
outputMsg = st.chat_message("ai")
|
| 1327 |
outputMsg.markdown(response)
|
| 1328 |
-
follow = await self.handleInput(
|
| 1329 |
outputMsg.markdown(follow)
|
| 1330 |
return follow
|
| 1331 |
|
|
@@ -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)
|
|
@@ -1772,11 +1772,11 @@ class Claude3:
|
|
| 1772 |
outputMsg.markdown(follow)
|
| 1773 |
return follow
|
| 1774 |
|
| 1775 |
-
if re.search(r'/
|
| 1776 |
response = await self.askCharacter(response)
|
| 1777 |
outputMsg = st.chat_message("ai")
|
| 1778 |
outputMsg.markdown(response)
|
| 1779 |
-
follow = await self.handleInput(
|
| 1780 |
outputMsg.markdown(follow)
|
| 1781 |
return follow
|
| 1782 |
|
|
@@ -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
|
|
@@ -2232,11 +2232,11 @@ class ForefrontAI:
|
|
| 2232 |
outputMsg.markdown(follow)
|
| 2233 |
return follow
|
| 2234 |
|
| 2235 |
-
if re.search(r'/
|
| 2236 |
response = await self.askCharacter(response)
|
| 2237 |
outputMsg = st.chat_message("ai")
|
| 2238 |
outputMsg.markdown(response)
|
| 2239 |
-
follow = await self.handleInput(
|
| 2240 |
outputMsg.markdown(follow)
|
| 2241 |
return follow
|
| 2242 |
|
|
@@ -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
|
|
@@ -2632,7 +2632,7 @@ class CharacterAI:
|
|
| 2632 |
return follow
|
| 2633 |
|
| 2634 |
if re.search(r'/askClaude3', response):
|
| 2635 |
-
answer4 = await self.
|
| 2636 |
outputMsg = st.chat_message("ai")
|
| 2637 |
outputMsg.markdown(answer4)
|
| 2638 |
follow = await self.handleInput(answer4)
|
|
@@ -2684,21 +2684,21 @@ class CharacterAI:
|
|
| 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)
|
|
@@ -3023,7 +3023,7 @@ class Chaindesk:
|
|
| 3023 |
return follow
|
| 3024 |
|
| 3025 |
if re.search(r'/askClaude3', response):
|
| 3026 |
-
answer4 = await self.
|
| 3027 |
outputMsg = st.chat_message("ai")
|
| 3028 |
outputMsg.markdown(answer4)
|
| 3029 |
follow = await self.handleInput(answer4)
|
|
@@ -3038,11 +3038,11 @@ class Chaindesk:
|
|
| 3038 |
outputMsg.markdown(follow)
|
| 3039 |
return follow
|
| 3040 |
|
| 3041 |
-
if re.search(r'/
|
| 3042 |
response = await self.askCharacter(response)
|
| 3043 |
outputMsg = st.chat_message("ai")
|
| 3044 |
outputMsg.markdown(response)
|
| 3045 |
-
follow = await self.handleInput(
|
| 3046 |
outputMsg.markdown(follow)
|
| 3047 |
return follow
|
| 3048 |
|
|
@@ -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)
|
|
@@ -3432,7 +3432,7 @@ class Flowise:
|
|
| 3432 |
return follow
|
| 3433 |
|
| 3434 |
if re.search(r'/askClaude3', response):
|
| 3435 |
-
answer4 = await self.
|
| 3436 |
outputMsg = st.chat_message("ai")
|
| 3437 |
outputMsg.markdown(answer4)
|
| 3438 |
follow = await self.handleInput(answer4)
|
|
@@ -3447,11 +3447,11 @@ class Flowise:
|
|
| 3447 |
outputMsg.markdown(follow)
|
| 3448 |
return follow
|
| 3449 |
|
| 3450 |
-
if re.search(r'/
|
| 3451 |
response = await self.askCharacter(response)
|
| 3452 |
outputMsg = st.chat_message("ai")
|
| 3453 |
outputMsg.markdown(response)
|
| 3454 |
-
follow = await self.handleInput(
|
| 3455 |
outputMsg.markdown(follow)
|
| 3456 |
return follow
|
| 3457 |
|
|
@@ -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 = "sk-9nDzLqZ7Umy7hmp1kZRPun628aSpABt6"
|
| 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 = "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"
|
| 292 |
claude = Claude3(api)
|
| 293 |
response = await claude.handleInput(question)
|
| 294 |
print(response)
|
|
|
|
| 396 |
return follow
|
| 397 |
|
| 398 |
if re.search(r'/askClaude3', response):
|
| 399 |
+
answer4 = await self.ask_Claude(response)
|
| 400 |
outputMsg = st.chat_message("ai")
|
| 401 |
outputMsg.markdown(answer4)
|
| 402 |
follow = await self.handleInput(answer4)
|
|
|
|
| 415 |
response = await self.askCharacter(response)
|
| 416 |
outputMsg = st.chat_message("ai")
|
| 417 |
outputMsg.markdown(response)
|
| 418 |
+
follow = await self.handleInput(answer4)
|
| 419 |
outputMsg.markdown(follow)
|
| 420 |
return follow
|
| 421 |
|
|
|
|
| 817 |
return follow
|
| 818 |
|
| 819 |
if re.search(r'/askClaude3', response):
|
| 820 |
+
answer4 = await self.ask_Claude(response)
|
| 821 |
outputMsg = st.chat_message("ai")
|
| 822 |
outputMsg.markdown(answer4)
|
| 823 |
follow = await self.handleInput(answer4)
|
|
|
|
| 832 |
outputMsg.markdown(follow)
|
| 833 |
return follow
|
| 834 |
|
| 835 |
+
if re.search(r'/askCharacter', response):
|
| 836 |
response = await self.askCharacter(response)
|
| 837 |
outputMsg = st.chat_message("ai")
|
| 838 |
outputMsg.markdown(response)
|
| 839 |
+
follow = await self.handleInput(answer4)
|
| 840 |
outputMsg.markdown(follow)
|
| 841 |
return follow
|
| 842 |
|
|
|
|
| 900 |
|
| 901 |
async def askCharacter(self, question):
|
| 902 |
characterID = await self.pickCharacter(question)
|
| 903 |
+
token = "d9016ef1aa499a1addb44049cedece57e21e8cbb"
|
| 904 |
character = CharacterAI(token, characterID)
|
| 905 |
answer = await character.handleInput(question)
|
| 906 |
return answer
|
| 907 |
|
| 908 |
async def ask_Forefront(self, question):
|
| 909 |
+
api = "sk-9nDzLqZ7Umy7hmp1kZRPun628aSpABt6"
|
| 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 = "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"
|
| 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 = "WZGOkHQbZULIzA6u83kyLGBKPigs1HmK9Ec8DEKmGOtu45zx"
|
| 924 |
+
llama = Llama2(api)
|
| 925 |
response = await llama.handleInput(question)
|
| 926 |
print(response)
|
| 927 |
return response
|
|
|
|
| 1306 |
return follow
|
| 1307 |
|
| 1308 |
if re.search(r'/askClaude3', response):
|
| 1309 |
+
answer4 = await self.ask_Claude(response)
|
| 1310 |
outputMsg = st.chat_message("ai")
|
| 1311 |
outputMsg.markdown(answer4)
|
| 1312 |
follow = await self.handleInput(answer4)
|
|
|
|
| 1321 |
outputMsg.markdown(follow)
|
| 1322 |
return follow
|
| 1323 |
|
| 1324 |
+
if re.search(r'/askCharacter', response):
|
| 1325 |
response = await self.askCharacter(response)
|
| 1326 |
outputMsg = st.chat_message("ai")
|
| 1327 |
outputMsg.markdown(response)
|
| 1328 |
+
follow = await self.handleInput(answer4)
|
| 1329 |
outputMsg.markdown(follow)
|
| 1330 |
return follow
|
| 1331 |
|
|
|
|
| 1389 |
|
| 1390 |
async def askCharacter(self, question):
|
| 1391 |
characterID = await self.pickCharacter(question)
|
| 1392 |
+
token = "d9016ef1aa499a1addb44049cedece57e21e8cbb"
|
| 1393 |
character = CharacterAI(token, characterID)
|
| 1394 |
answer = await character.handleInput(question)
|
| 1395 |
return answer
|
| 1396 |
|
| 1397 |
async def ask_Forefront(self, question):
|
| 1398 |
+
api = "sk-9nDzLqZ7Umy7hmp1kZRPun628aSpABt6"
|
| 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 = "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"
|
| 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 = "WZGOkHQbZULIzA6u83kyLGBKPigs1HmK9Ec8DEKmGOtu45zx"
|
| 1413 |
llama = AgentLlama2(api)
|
| 1414 |
response = await llama.handleInput(question)
|
| 1415 |
print(response)
|
|
|
|
| 1772 |
outputMsg.markdown(follow)
|
| 1773 |
return follow
|
| 1774 |
|
| 1775 |
+
if re.search(r'/askCharacter', response):
|
| 1776 |
response = await self.askCharacter(response)
|
| 1777 |
outputMsg = st.chat_message("ai")
|
| 1778 |
outputMsg.markdown(response)
|
| 1779 |
+
follow = await self.handleInput(answer4)
|
| 1780 |
outputMsg.markdown(follow)
|
| 1781 |
return follow
|
| 1782 |
|
|
|
|
| 1840 |
|
| 1841 |
async def askCharacter(self, question):
|
| 1842 |
characterID = await self.pickCharacter(question)
|
| 1843 |
+
token = "d9016ef1aa499a1addb44049cedece57e21e8cbb"
|
| 1844 |
character = CharacterAI(token, characterID)
|
| 1845 |
answer = await character.handleInput(question)
|
| 1846 |
return answer
|
| 1847 |
|
| 1848 |
async def ask_Forefront(self, question):
|
| 1849 |
+
api = "sk-9nDzLqZ7Umy7hmp1kZRPun628aSpABt6"
|
| 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 = "WZGOkHQbZULIzA6u83kyLGBKPigs1HmK9Ec8DEKmGOtu45zx"
|
| 1857 |
+
llama = Llama2(api)
|
| 1858 |
response = await llama.handleInput(question)
|
| 1859 |
print(response)
|
| 1860 |
return response
|
|
|
|
| 2232 |
outputMsg.markdown(follow)
|
| 2233 |
return follow
|
| 2234 |
|
| 2235 |
+
if re.search(r'/askCharacter', response):
|
| 2236 |
response = await self.askCharacter(response)
|
| 2237 |
outputMsg = st.chat_message("ai")
|
| 2238 |
outputMsg.markdown(response)
|
| 2239 |
+
follow = await self.handleInput(answer4)
|
| 2240 |
outputMsg.markdown(follow)
|
| 2241 |
return follow
|
| 2242 |
|
|
|
|
| 2300 |
|
| 2301 |
async def askCharacter(self, question):
|
| 2302 |
characterID = await self.pickCharacter(question)
|
| 2303 |
+
token = "d9016ef1aa499a1addb44049cedece57e21e8cbb"
|
| 2304 |
character = CharacterAI(token, characterID)
|
| 2305 |
answer = await character.handleInput(question)
|
| 2306 |
return answer
|
| 2307 |
+
|
| 2308 |
async def ask_Claude(self, question):
|
| 2309 |
+
api = "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"
|
| 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 = "WZGOkHQbZULIzA6u83kyLGBKPigs1HmK9Ec8DEKmGOtu45zx"
|
| 2317 |
+
llama = Llama2(api)
|
| 2318 |
response = await llama.handleInput(question)
|
| 2319 |
print(response)
|
| 2320 |
return response
|
|
|
|
| 2632 |
return follow
|
| 2633 |
|
| 2634 |
if re.search(r'/askClaude3', response):
|
| 2635 |
+
answer4 = await self.ask_Claude(response)
|
| 2636 |
outputMsg = st.chat_message("ai")
|
| 2637 |
outputMsg.markdown(answer4)
|
| 2638 |
follow = await self.handleInput(answer4)
|
|
|
|
| 2684 |
return response
|
| 2685 |
|
| 2686 |
async def ask_Forefront(self, question):
|
| 2687 |
+
api = "sk-9nDzLqZ7Umy7hmp1kZRPun628aSpABt6"
|
| 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 = "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"
|
| 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 = "WZGOkHQbZULIzA6u83kyLGBKPigs1HmK9Ec8DEKmGOtu45zx"
|
| 2702 |
llama = AgentLlama2(api)
|
| 2703 |
response = await llama.handleInput(question)
|
| 2704 |
print(response)
|
|
|
|
| 3023 |
return follow
|
| 3024 |
|
| 3025 |
if re.search(r'/askClaude3', response):
|
| 3026 |
+
answer4 = await self.ask_Claude(response)
|
| 3027 |
outputMsg = st.chat_message("ai")
|
| 3028 |
outputMsg.markdown(answer4)
|
| 3029 |
follow = await self.handleInput(answer4)
|
|
|
|
| 3038 |
outputMsg.markdown(follow)
|
| 3039 |
return follow
|
| 3040 |
|
| 3041 |
+
if re.search(r'/askCharacter', response):
|
| 3042 |
response = await self.askCharacter(response)
|
| 3043 |
outputMsg = st.chat_message("ai")
|
| 3044 |
outputMsg.markdown(response)
|
| 3045 |
+
follow = await self.handleInput(answer4)
|
| 3046 |
outputMsg.markdown(follow)
|
| 3047 |
return follow
|
| 3048 |
|
|
|
|
| 3089 |
|
| 3090 |
async def askCharacter(self, question):
|
| 3091 |
characterID = await self.pickCharacter(question)
|
| 3092 |
+
token = "d9016ef1aa499a1addb44049cedece57e21e8cbb"
|
| 3093 |
character = CharacterAI(token, characterID)
|
| 3094 |
answer = await character.handleInput(question)
|
| 3095 |
return answer
|
| 3096 |
|
| 3097 |
async def ask_Forefront(self, question):
|
| 3098 |
+
api = "sk-9nDzLqZ7Umy7hmp1kZRPun628aSpABt6"
|
| 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 = "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"
|
| 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 = "WZGOkHQbZULIzA6u83kyLGBKPigs1HmK9Ec8DEKmGOtu45zx"
|
| 3113 |
llama = AgentLlama2(api)
|
| 3114 |
response = await llama.handleInput(question)
|
| 3115 |
print(response)
|
|
|
|
| 3432 |
return follow
|
| 3433 |
|
| 3434 |
if re.search(r'/askClaude3', response):
|
| 3435 |
+
answer4 = await self.ask_Claude(response)
|
| 3436 |
outputMsg = st.chat_message("ai")
|
| 3437 |
outputMsg.markdown(answer4)
|
| 3438 |
follow = await self.handleInput(answer4)
|
|
|
|
| 3447 |
outputMsg.markdown(follow)
|
| 3448 |
return follow
|
| 3449 |
|
| 3450 |
+
if re.search(r'/askCharacter', response):
|
| 3451 |
response = await self.askCharacter(response)
|
| 3452 |
outputMsg = st.chat_message("ai")
|
| 3453 |
outputMsg.markdown(response)
|
| 3454 |
+
follow = await self.handleInput(answer4)
|
| 3455 |
outputMsg.markdown(follow)
|
| 3456 |
return follow
|
| 3457 |
|
|
|
|
| 3500 |
|
| 3501 |
async def askCharacter(self, question):
|
| 3502 |
characterID = await self.pickCharacter(question)
|
| 3503 |
+
token = "d9016ef1aa499a1addb44049cedece57e21e8cbb"
|
| 3504 |
character = CharacterAI(token, characterID)
|
| 3505 |
answer = await character.handleInput(question)
|
| 3506 |
return answer
|
| 3507 |
|
| 3508 |
async def ask_Forefront(self, question):
|
| 3509 |
+
api = "sk-9nDzLqZ7Umy7hmp1kZRPun628aSpABt6"
|
| 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 = "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"
|
| 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 = "WZGOkHQbZULIzA6u83kyLGBKPigs1HmK9Ec8DEKmGOtu45zx"
|
| 3524 |
llama = AgentLlama2(api)
|
| 3525 |
response = await llama.handleInput(question)
|
| 3526 |
print(response)
|