"\u001b[32m2023-12-14 13:16:49 INFO semantic_router.utils.logger Generating config...\u001b[0m\n",
"\u001b[32m2023-12-14 13:16:54 INFO semantic_router.utils.logger AI message: {\"name\": \"get_time\", \"utterances\": [\"What is the current time in London?\", \"Tell me the time in New York\", \"What's happening now in Paris?\", \"time in San Francisco?\", \"Tell me the time in Sydney\"]}\u001b[0m\n",
"\u001b[32m2023-12-14 13:16:54 INFO semantic_router.utils.logger Generated config: {'name': 'get_time', 'utterances': ['What is the current time in London?', 'Tell me the time in New York', \"What's happening now in Paris?\", 'time in San Francisco?', 'Tell me the time in Sydney', 'Get the current time']}\u001b[0m\n",
"\u001b[32m2023-12-14 13:16:54 INFO semantic_router.utils.logger Getting route layer...\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Getting function name for queries:\n",
"\n",
"What is the weather like in Barcelona? None {}\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2023-12-14 13:16:55 INFO semantic_router.utils.logger Extracting parameters...\u001b[0m\n",
"\u001b[32m2023-12-14 13:16:56 INFO semantic_router.utils.logger AI message: {\"location\": \"Taiwan\"}\u001b[0m\n",
"\u001b[32m2023-12-14 13:16:56 INFO semantic_router.utils.logger Extracted parameters: {'location': 'Taiwan'}\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"What time is it in Taiwan? get_time {'location': 'Taiwan'}\n",
"Calling get_time function with location: Taiwan\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2023-12-14 13:16:56 INFO semantic_router.utils.logger Extracting parameters...\u001b[0m\n",
"\u001b[32m2023-12-14 13:16:58 INFO semantic_router.utils.logger AI message: {\"location\": \"the world\"}\u001b[0m\n",
"\u001b[32m2023-12-14 13:16:58 INFO semantic_router.utils.logger Extracted parameters: {'location': 'the world'}\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"What is happening in the world? get_time {'location': 'the world'}\n",
"Calling get_time function with location: the world\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2023-12-14 13:16:58 INFO semantic_router.utils.logger Extracting parameters...\u001b[0m\n",
"\u001b[32m2023-12-14 13:17:00 INFO semantic_router.utils.logger AI message: {\"location\": \"Kaunas\"}\u001b[0m\n",
"\u001b[32m2023-12-14 13:17:00 INFO semantic_router.utils.logger Extracted parameters: {'location': 'Kaunas'}\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"what is the time in Kaunas? get_time {'location': 'Kaunas'}\n",
"Calling get_time function with location: Kaunas\n",
"Im bored None {}\n",
"I want to play a game None {}\n",
"Banana None {}\n"
]
}
],
"outputs": [],
"source": [
"def get_time(location: str) -> str:\n",
" print(f\"Calling get_time function with location: {location}\")\n",
[32m2023-12-14 13:16:49 INFO semantic_router.utils.logger Generating config...[0m
[32m2023-12-14 13:16:54 INFO semantic_router.utils.logger AI message: {"name": "get_time", "utterances": ["What is the current time in London?", "Tell me the time in New York", "What's happening now in Paris?", "time in San Francisco?", "Tell me the time in Sydney"]}[0m
[32m2023-12-14 13:16:54 INFO semantic_router.utils.logger Generated config: {'name': 'get_time', 'utterances': ['What is the current time in London?', 'Tell me the time in New York', "What's happening now in Paris?", 'time in San Francisco?', 'Tell me the time in Sydney', 'Get the current time']}[0m
[32m2023-12-14 13:16:54 INFO semantic_router.utils.logger Getting route layer...[0m
Getting function name for queries:
What is the weather like in Barcelona? None {}
[32m2023-12-14 13:16:55 INFO semantic_router.utils.logger Extracting parameters...[0m
[32m2023-12-14 13:16:56 INFO semantic_router.utils.logger AI message: {"location": "Taiwan"}[0m
[32m2023-12-14 13:16:56 INFO semantic_router.utils.logger Extracted parameters: {'location': 'Taiwan'}[0m
What time is it in Taiwan? get_time {'location': 'Taiwan'}
Calling get_time function with location: Taiwan
[32m2023-12-14 13:16:56 INFO semantic_router.utils.logger Extracting parameters...[0m
[32m2023-12-14 13:16:58 INFO semantic_router.utils.logger AI message: {"location": "the world"}[0m
[32m2023-12-14 13:16:58 INFO semantic_router.utils.logger Extracted parameters: {'location': 'the world'}[0m
What is happening in the world? get_time {'location': 'the world'}
Calling get_time function with location: the world
[32m2023-12-14 13:16:58 INFO semantic_router.utils.logger Extracting parameters...[0m
[32m2023-12-14 13:17:00 INFO semantic_router.utils.logger AI message: {"location": "Kaunas"}[0m
[32m2023-12-14 13:17:00 INFO semantic_router.utils.logger Extracted parameters: {'location': 'Kaunas'}[0m
what is the time in Kaunas? get_time {'location': 'Kaunas'}