switch for toolcalls
This commit is contained in:
5
llama.py
5
llama.py
@@ -23,7 +23,7 @@ summarize_user = {"role": "system", "content": "Can you summarize the conversati
|
|||||||
# system message to create a conversation title
|
# system message to create a conversation title
|
||||||
title_prompt = {"role": "system", "content": "Please create a very short and descriptive title or label for this conversation. Maximum 2-5 words. Use only plain text, avoid numbering, special characters, or unnecessary formatting-focus on clarity and brevity."}
|
title_prompt = {"role": "system", "content": "Please create a very short and descriptive title or label for this conversation. Maximum 2-5 words. Use only plain text, avoid numbering, special characters, or unnecessary formatting-focus on clarity and brevity."}
|
||||||
|
|
||||||
|
append_toolcalls = True
|
||||||
|
|
||||||
register_dummy()
|
register_dummy()
|
||||||
|
|
||||||
@@ -65,7 +65,10 @@ def main():
|
|||||||
inference = Inference()
|
inference = Inference()
|
||||||
|
|
||||||
current_date_and_time = datetime.datetime.now().strftime("Current date is %Y-%m-%d and its %H:%M %p right now.")
|
current_date_and_time = datetime.datetime.now().strftime("Current date is %Y-%m-%d and its %H:%M %p right now.")
|
||||||
|
if append_toolcalls:
|
||||||
messages = [{"role": "system", "content": systemmessage + "\n" + current_date_and_time + "\n" + inference.generate_tool_use_header(tool_list)}]
|
messages = [{"role": "system", "content": systemmessage + "\n" + current_date_and_time + "\n" + inference.generate_tool_use_header(tool_list)}]
|
||||||
|
else:
|
||||||
|
messages = [{"role": "system", "content": systemmessage + "\n" + current_date_and_time}]
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
# print an input prompt to receive text or commands
|
# print an input prompt to receive text or commands
|
||||||
|
Reference in New Issue
Block a user