Update README.md
Browse files
README.md
CHANGED
@@ -55,13 +55,19 @@ Please answer the following query:
|
|
55 |
{{ query }}
|
56 |
""".lstrip())
|
57 |
|
58 |
-
def prepare_messages(
|
|
|
|
|
|
|
|
|
59 |
"""Prepare the system and user messages for the given query and tools.
|
60 |
|
61 |
Args:
|
62 |
query: The query to be answered.
|
63 |
tools: The tools available to the user. Defaults to None, in which case if a
|
64 |
list without content will be passed to the model.
|
|
|
|
|
65 |
"""
|
66 |
if tools is None:
|
67 |
tools = []
|
|
|
55 |
{{ query }}
|
56 |
""".lstrip())
|
57 |
|
58 |
+
def prepare_messages(
|
59 |
+
query: str,
|
60 |
+
tools: Optional[dict[str, any]] = None,
|
61 |
+
conversation_history: Optional[list[dict[str, str]]] = None
|
62 |
+
) -> list[dict[str, str]]:
|
63 |
"""Prepare the system and user messages for the given query and tools.
|
64 |
|
65 |
Args:
|
66 |
query: The query to be answered.
|
67 |
tools: The tools available to the user. Defaults to None, in which case if a
|
68 |
list without content will be passed to the model.
|
69 |
+
conversation_history: Exchange of messages, including the system_prompt from
|
70 |
+
the first query. Defaults to None, the first message in a conversation.
|
71 |
"""
|
72 |
if tools is None:
|
73 |
tools = []
|