Browse Source

switch for toolcalls

master
Florin Tobler 5 months ago
parent
commit
677eb6d0ea
  1. 7
      llama.py

7
llama.py

@ -23,7 +23,7 @@ summarize_user = {"role": "system", "content": "Can you summarize the conversati
# 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."}
append_toolcalls = True
register_dummy()
@ -65,7 +65,10 @@ def main():
inference = Inference()
current_date_and_time = datetime.datetime.now().strftime("Current date is %Y-%m-%d and its %H:%M %p right now.")
messages = [{"role": "system", "content": systemmessage + "\n" + current_date_and_time + "\n" + inference.generate_tool_use_header(tool_list)}]
if append_toolcalls:
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:
# print an input prompt to receive text or commands

Loading…
Cancel
Save