Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions XAgent/tool_call_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def __init__(self):
def log_task_submit(self, arguments):
# assert arguments["name"] == "subtask_submit"
logger.typewriter_log(
f"-=-=-=-=-=-=-= SUBTASK SUBMITED -=-=-=-=-=-=-=",
f"-=-=-=-=-=-=-= SUBTASK SUBMITTED -=-=-=-=-=-=-=",
Fore.YELLOW,
"",
)
Expand Down Expand Up @@ -501,4 +501,4 @@ def handle_human_help(self, arguments):
plan_refine = False
return plan_refine, ToolCallStatusCode.TOOL_CALL_SUCCESS, command_result

function_handler = FunctionHandler()
function_handler = FunctionHandler()
6 changes: 3 additions & 3 deletions XAgent/vector_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def insert_sentence(self, vec_sentence:str, sentence:str, namespace=""):
print(e)
print("Warning: Fail to insert", sentence)
else:
print("Warning: Failed to generate embeding for ", sentence)
print("Warning: Failed to generate embedding for ", sentence)

def search_similar_sentences(self, query_sentence:str, namespace="", top_k=1):

Expand All @@ -101,10 +101,10 @@ def search_similar_sentences(self, query_sentence:str, namespace="", top_k=1):
print(e)
print("Warning: Fail to search similar sentences")
else:
print("Warning: Fail to generate embeding")
print("Warning: Fail to generate embedding")


if __name__ == "__main__":
VDB = VectorDBInterface()
VDB.insert_sentence("I plan to go to cinema", "test2")
VDB.search_similar_sentences("hi, today is good", "test2")
VDB.search_similar_sentences("hi, today is good", "test2")