|
1 |
| -#from agent import createSessionToken, sendMessage |
| 1 | +from agent import createSessionToken, sendMessage |
2 | 2 |
|
3 | 3 | import streamlit as st
|
4 | 4 | import base64
|
5 | 5 |
|
6 | 6 | # Test
|
7 |
| - |
| 7 | +testToggle = False |
8 | 8 | #session = createSessionToken()
|
9 | 9 | #print(session)
|
10 | 10 | #input = "Bye"
|
11 | 11 | #print(sendMessage("9a130562", input, True))
|
12 | 12 |
|
13 | 13 | # Mock the backend interaction
|
14 |
| -def createSessionToken(): |
15 |
| - return "mock_session_id" |
16 |
| - |
17 |
| -def sendMessage(session_id, input, is_initial=False): |
18 |
| - # Mock response from the bot |
19 |
| - if "bye" in input.lower(): |
20 |
| - return {'text': "Goodbye! Have a great day!", 'files': []} |
21 |
| - elif "team" in input.lower(): |
22 |
| - return {'text': "Sure! Let's build your Valorant team. Who would you like to start with?", 'files': []} |
23 |
| - else: |
24 |
| - return {'text': f"You said: {input}", 'files': []} |
25 |
| - |
| 14 | +if testToggle == True: |
| 15 | + |
| 16 | + def createSessionToken(): |
| 17 | + return "mock_session_id" |
| 18 | + |
| 19 | + def sendMessage(session_id, input, is_initial=False): |
| 20 | + # Mock response from the bot |
| 21 | + if "bye" in input.lower(): |
| 22 | + return {'text': "Goodbye! Have a great day!", 'files': []} |
| 23 | + elif "team" in input.lower(): |
| 24 | + return {'text': "Sure! Let's build your Valorant team. Who would you like to start with?", 'files': []} |
| 25 | + else: |
| 26 | + return {'text': f"You said: {input}", 'files': []} |
26 | 27 |
|
27 | 28 | bot_name = "VCT Bot" # Set a custom name for the bot
|
28 | 29 | st.markdown(
|
|
0 commit comments