Skip to content

Commit

Permalink
feat: switch chat is temply not work now, and the context limit make …
Browse files Browse the repository at this point in the history
…the conversation is not so important
  • Loading branch information
carlos-wong committed Mar 7, 2023
1 parent 08a85ba commit f88faeb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
7 changes: 4 additions & 3 deletions chatgpt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# chatgpt.py
import sys

sys.path.insert(0, '/Users/carlos/Downloads/chatgpt-wrapper')

from epc.server import EPCServer
from chatgpt_wrapper import ChatGPT
Expand Down Expand Up @@ -37,10 +40,8 @@ def querystream(query):
def switch_to_chat(chat_uuid):
global bot
get_cahtgpt_bot()
bot.switch_to_conversation(chat_uuid)
# bot.switch_to_conversation(chat_uuid)
return ""

# print("EPC chatgpt Server start")

server.print_port()
server.serve_forever()
12 changes: 7 additions & 5 deletions chatgpt_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,19 @@

# conversation_info = bot.get_conversation_info("e6db6053-ae64-410f-b979-02fc24b8ad55")

bot.switch_to_conversation("e6db6053-ae64-410f-b979-02fc24b8ad55")
print("try to swtich conversation")

# bot.switch_to_conversation("e6db6053-ae64-410f-b979-02fc24b8ad55")

# print("response is: {0}".format(response))
# response = bot.ask("not it is 4 ")

# print("response is: {0}".format(response))

current_time = datetime.datetime.now();formatted_time = current_time.strftime("%Y-%m-%d %H:%M:%S")

response = bot.ask("sorry it is 3 and now is:{0}".format(formatted_time))
current_time = datetime.datetime.now(); formatted_time = current_time.strftime("%Y-%m-%d %H:%M:%S")
print("after switch conversation, try to ask")
# response = bot.ask("what is my name and now is:{0}".format(formatted_time))
# print("response is: {0}".format(response))

print("response is: {0}".format(response))
# input_result = input("Press Enter to continue...")
import code; code.interact(local=locals())

0 comments on commit f88faeb

Please sign in to comment.