Skip to content

Commit

Permalink
Fix history issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Aug 10, 2023
1 parent 5792a64 commit e3096ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions agixt/Interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ async def format_prompt(
]
else:
helper_agent_name = self.agent_name
if "conversation_name" in kwargs:
conversation_name = kwargs["conversation_name"]
if conversation_name == "":
conversation_name = uuid.uuid4()
conversation = get_conversation(
Expand Down Expand Up @@ -193,6 +195,8 @@ async def run(
shots = int(shots)
disable_memory = True if str(disable_memory).lower() == "true" else False
browse_links = True if str(browse_links).lower() == "true" else False
if "conversation_name" in kwargs:
conversation_name = kwargs["conversation_name"]
if conversation_name != "":
conversation_name = uuid.uuid4()
if "WEBSEARCH_TIMEOUT" in self.agent.PROVIDER_SETTINGS:
Expand Down
4 changes: 2 additions & 2 deletions agixt/fb/History.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def get_conversation(conversation_name=None, limit=100, page=1, agent_name=None)
if os.path.exists(history_file):
with open(history_file, "r") as file:
history = yaml.safe_load(file)
except Exception as e:
print(e)
except:
new_conversation(conversation_name=conversation_name)
return history


Expand Down
2 changes: 1 addition & 1 deletion agixt/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.3.82
v1.3.83

0 comments on commit e3096ab

Please sign in to comment.