Hansimov commited on
Commit
fc9b1ad
1 Parent(s): 467e4d9

:bulb: [Test] Mulitple round chats

Browse files
Files changed (1) hide show
  1. conversation_connector.py +11 -8
conversation_connector.py CHANGED
@@ -2,7 +2,6 @@ import aiohttp
2
  import asyncio
3
  import httpx
4
  import json
5
- import pprint
6
  import urllib
7
 
8
  from conversation_creator import ConversationCreator
@@ -37,7 +36,7 @@ class ConversationConnectRequestHeadersConstructor:
37
  class ConversationConnector:
38
  def __init__(
39
  self,
40
- conversation_style="pecise",
41
  sec_access_token=None,
42
  client_id=None,
43
  conversation_id=None,
@@ -139,11 +138,15 @@ if __name__ == "__main__":
139
  client_id=creator.response_content["clientId"],
140
  conversation_id=creator.response_content["conversationId"],
141
  )
142
- prompt = "Today's weather of California"
143
- # prompt = "Tell me your name. Your output should be no more than 3 words."
144
- logger.success(f"\n[User]: ", end="")
145
- logger.mesg(f"{prompt}")
146
- logger.success(f"\n[Bing]:")
147
  loop = asyncio.get_event_loop()
148
- loop.run_until_complete(connector.stream_chat(prompt=prompt))
 
 
 
 
149
  loop.close()
 
2
  import asyncio
3
  import httpx
4
  import json
 
5
  import urllib
6
 
7
  from conversation_creator import ConversationCreator
 
36
  class ConversationConnector:
37
  def __init__(
38
  self,
39
+ conversation_style="precise",
40
  sec_access_token=None,
41
  client_id=None,
42
  conversation_id=None,
 
138
  client_id=creator.response_content["clientId"],
139
  conversation_id=creator.response_content["conversationId"],
140
  )
141
+
142
+ prompts = [
143
+ "Today's weather of California",
144
+ "Please summarize your previous answer in table format",
145
+ ]
146
  loop = asyncio.get_event_loop()
147
+ for prompt in prompts:
148
+ logger.success(f"\n[User]: ", end="")
149
+ logger.mesg(f"{prompt}")
150
+ logger.success(f"[Bing]:")
151
+ loop.run_until_complete(connector.stream_chat(prompt=prompt))
152
  loop.close()