"\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",
"name": "stdout",
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Generating config...\n",
"AI message: {\n",
" \"name\": \"get_time\",\n",
" \"utterances\": [\n",
" \"What is the current time in SF?\",\n",
" \"Tell me the time in London\",\n",
" \"Could you tell me the time in New York?\",\n",
" \"May I know the current time in Paris?\",\n",
" \"Can you tell me what time is it in Singapore?\"\n",
" ]\n",
"}\n",
"Getting route layer...\n",
"Getting function name for queries:\n",
"Getting function name for queries:\n",
"\n",
"\n",
"(None, 'What is the weather like in Barcelona?')\n",
"What is the weather like in Barcelona? None {}\n"
"('get_time', 'What time is it in Taiwan?')\n",
]
"(None, 'What is happening in the world?')\n",
},
"('get_time', 'what is the time in Kaunas?')\n",
{
"(None, 'Im bored')\n",
"name": "stderr",
"(None, 'I want to play a game')\n",
"output_type": "stream",
"(None, 'Banana')\n"
"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"
]
]
}
}
],
],
"source": [
"source": [
"def get_time(location: str) -> str:\n",
" print(f\"Calling get_time function with location: {location}\")\n",
" return \"get_time\"\n",
"\n",
"\n",
"specification = {\n",
"specification = {\n",
" \"type\": \"function\",\n",
" \"type\": \"function\",\n",
" \"function\": {\n",
" \"function\": {\n",
...
@@ -178,8 +327,26 @@
...
@@ -178,8 +327,26 @@
"print(\"Getting function name for queries:\\n\")\n",
"print(\"Getting function name for queries:\\n\")\n",
[32m2023-12-14 13:16:49 INFO semantic_router.utils.logger Generating config...[0m
AI message: {
[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
"name": "get_time",
[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
"utterances": [
[32m2023-12-14 13:16:54 INFO semantic_router.utils.logger Getting route layer...[0m
"What is the current time in SF?",
"Tell me the time in London",
"Could you tell me the time in New York?",
"May I know the current time in Paris?",
"Can you tell me what time is it in Singapore?"
]
}
Getting route layer...
Getting function name for queries:
Getting function name for queries:
(None, 'What is the weather like in Barcelona?')
What is the weather like in Barcelona? None {}
('get_time', 'What time is it in Taiwan?')
(None, 'What is happening in the world?')
[32m2023-12-14 13:16:55 INFO semantic_router.utils.logger Extracting parameters...[0m
('get_time', 'what is the time in Kaunas?')
[32m2023-12-14 13:16:56 INFO semantic_router.utils.logger AI message: {"location": "Taiwan"}[0m
(None, 'Im bored')
[32m2023-12-14 13:16:56 INFO semantic_router.utils.logger Extracted parameters: {'location': 'Taiwan'}[0m
(None, 'I want to play a game')
(None, 'Banana')
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'}