fix for message handling bug on initialization

This commit is contained in:
Kwindla Hultman Kramer
2024-10-16 12:40:20 -07:00
parent edd44cc181
commit 93c9e219ce
2 changed files with 32 additions and 3 deletions

View File

@@ -124,7 +124,21 @@ Remember, your responses should be short. Just one or two sentences, usually."""
# llm.register_function(None, fetch_weather_from_api)
llm.register_function("get_current_weather", fetch_weather_from_api)
context = OpenAILLMContext([{"role": "user", "content": "Say hello!"}], tools)
context = OpenAILLMContext(
[{"role": "user", "content": "Say hello!"}],
# [{"role": "user", "content": [{"type": "text", "text": "Say hello!"}]}],
# [
# {
# "role": "user",
# "content": [
# {"type": "text", "text": "Say"},
# {"type": "text", "text": "yo what's up!"},
# ],
# }
# ],
tools,
)
context_aggregator = llm.create_context_aggregator(context)
pipeline = Pipeline(