|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "code", |
5 | | - "execution_count": 8, |
| 5 | + "execution_count": null, |
6 | 6 | "metadata": {}, |
7 | 7 | "outputs": [], |
8 | 8 | "source": [ |
|
13 | 13 | }, |
14 | 14 | { |
15 | 15 | "cell_type": "code", |
16 | | - "execution_count": 9, |
| 16 | + "execution_count": null, |
17 | 17 | "metadata": {}, |
18 | 18 | "outputs": [], |
19 | 19 | "source": [ |
|
22 | 22 | }, |
23 | 23 | { |
24 | 24 | "cell_type": "code", |
25 | | - "execution_count": 10, |
| 25 | + "execution_count": null, |
26 | 26 | "metadata": {}, |
27 | | - "outputs": [ |
28 | | - { |
29 | | - "data": { |
30 | | - "text/plain": [ |
31 | | - "True" |
32 | | - ] |
33 | | - }, |
34 | | - "execution_count": 10, |
35 | | - "metadata": {}, |
36 | | - "output_type": "execute_result" |
37 | | - } |
38 | | - ], |
| 27 | + "outputs": [], |
39 | 28 | "source": [ |
40 | 29 | "dotenv.load_dotenv()" |
41 | 30 | ] |
42 | 31 | }, |
43 | 32 | { |
44 | 33 | "cell_type": "code", |
45 | | - "execution_count": 11, |
| 34 | + "execution_count": null, |
46 | 35 | "metadata": {}, |
47 | | - "outputs": [ |
48 | | - { |
49 | | - "name": "stderr", |
50 | | - "output_type": "stream", |
51 | | - "text": [ |
52 | | - "INFO:autogen_core:Publishing message of type GroupChatStart to all subscribers: {'message': TextMessage(source='user', models_usage=None, content='What are the total number of sales within 2008?')}\n", |
53 | | - "INFO:autogen_core:Calling message handler for SQL_Query_Generation_Agent with message type GroupChatStart published by Unknown\n", |
54 | | - "INFO:autogen_core:Calling message handler for SQL_Schema_Selection_Agent with message type GroupChatStart published by Unknown\n", |
55 | | - "INFO:autogen_core:Calling message handler for SQL_Query_Correction_Agent with message type GroupChatStart published by Unknown\n", |
56 | | - "INFO:autogen_core:Calling message handler for SQL_Query_Cache_Agent with message type GroupChatStart published by Unknown\n", |
57 | | - "INFO:autogen_core:Calling message handler for Answer_Agent with message type GroupChatStart published by Unknown\n", |
58 | | - "INFO:autogen_core:Calling message handler for Question_Decomposition_Agent with message type GroupChatStart published by Unknown\n", |
59 | | - "INFO:autogen_core:Calling message handler for SQL_Query_Generation_Agent with message type GroupChatStart published by Unknown\n", |
60 | | - "INFO:autogen_core:Calling message handler for SQL_Schema_Selection_Agent with message type GroupChatStart published by Unknown\n", |
61 | | - "INFO:autogen_core:Calling message handler for SQL_Query_Correction_Agent with message type GroupChatStart published by Unknown\n", |
62 | | - "INFO:autogen_core:Calling message handler for SQL_Query_Cache_Agent with message type GroupChatStart published by Unknown\n", |
63 | | - "INFO:autogen_core:Calling message handler for Answer_Agent with message type GroupChatStart published by Unknown\n", |
64 | | - "INFO:autogen_core:Calling message handler for Question_Decomposition_Agent with message type GroupChatStart published by Unknown\n", |
65 | | - "INFO:autogen_core:Calling message handler for group_chat_manager with message type GroupChatStart published by Unknown\n", |
66 | | - "INFO:autogen_core:Publishing message of type GroupChatStart to all subscribers: {'message': TextMessage(source='user', models_usage=None, content='What are the total number of sales within 2008?')}\n", |
67 | | - "INFO:autogen_core:Calling message handler for collect_output_messages with message type GroupChatStart published by group_chat_manager/3b4d5ab6-7cfa-4179-8079-28bf0d1e0db4\n", |
68 | | - "INFO:autogen_agentchat.events:source='user' models_usage=None content='What are the total number of sales within 2008?'\n", |
69 | | - "INFO:httpx:HTTP Request: POST https://aoai-text2sql-adi.openai.azure.com/openai/deployments/gpt-4o-mini/chat/completions?api-version=2024-08-01-preview \"HTTP/1.1 200 OK\"\n", |
70 | | - "INFO:autogen_core.events:{\"prompt_tokens\": 1801, \"completion_tokens\": 6, \"type\": \"LLMCall\"}\n", |
71 | | - "INFO:autogen_core:Publishing message of type GroupChatRequestPublish to all subscribers: {}\n", |
72 | | - "INFO:autogen_core:Calling message handler for SQL_Query_Cache_Agent with message type GroupChatRequestPublish published by group_chat_manager/3b4d5ab6-7cfa-4179-8079-28bf0d1e0db4\n", |
73 | | - "INFO:httpx:HTTP Request: POST https://aoai-text2sql-adi.openai.azure.com/openai/deployments/gpt-4o-mini/chat/completions?api-version=2024-08-01-preview \"HTTP/1.1 200 OK\"\n", |
74 | | - "INFO:autogen_core.events:{\"prompt_tokens\": 1582, \"completion_tokens\": 28, \"type\": \"LLMCall\"}\n", |
75 | | - "INFO:autogen_core:Publishing message of type GroupChatMessage to all subscribers: {'message': ToolCallMessage(source='SQL_Query_Cache_Agent', models_usage=RequestUsage(prompt_tokens=1582, completion_tokens=28), content=[FunctionCall(id='call_CSvANg2842Hg57erUpUGssoe', arguments='{\"question\":\"What is the total number of sales orders in 2008?\"}', name='fetch_queries_from_cache')])}\n", |
76 | | - "INFO:autogen_core:Calling message handler for collect_output_messages with message type GroupChatMessage published by SQL_Query_Cache_Agent/3b4d5ab6-7cfa-4179-8079-28bf0d1e0db4\n", |
77 | | - "INFO:autogen_agentchat.events:source='SQL_Query_Cache_Agent' models_usage=RequestUsage(prompt_tokens=1582, completion_tokens=28) content=[FunctionCall(id='call_CSvANg2842Hg57erUpUGssoe', arguments='{\"question\":\"What is the total number of sales orders in 2008?\"}', name='fetch_queries_from_cache')]\n", |
78 | | - "INFO:httpx:HTTP Request: POST https://aoai-text2sql-adi.openai.azure.com/openai/deployments/text-embedding-ada-002/embeddings?api-version=2023-03-15-preview \"HTTP/1.1 200 OK\"\n", |
79 | | - "INFO:azure.core.pipeline.policies.http_logging_policy:Request URL: 'https://aisearch-text2sql-adi.search.windows.net/indexes('text-2-sql-query-cache-index')/docs/search.post.search?api-version=REDACTED'\n", |
80 | | - "Request method: 'POST'\n", |
81 | | - "Request headers:\n", |
82 | | - " 'Content-Type': 'application/json'\n", |
83 | | - " 'Content-Length': '34704'\n", |
84 | | - " 'api-key': 'REDACTED'\n", |
85 | | - " 'Accept': 'application/json;odata.metadata=none'\n", |
86 | | - " 'x-ms-client-request-id': '6a968312-a735-11ef-a762-0242ac110002'\n", |
87 | | - " 'User-Agent': 'azsdk-python-search-documents/11.6.0b5 Python/3.12.6 (Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.36)'\n", |
88 | | - "A body is sent with the request\n", |
89 | | - "INFO:azure.core.pipeline.policies.http_logging_policy:Response status: 200\n", |
90 | | - "Response headers:\n", |
91 | | - " 'Transfer-Encoding': 'chunked'\n", |
92 | | - " 'Content-Type': 'application/json; odata.metadata=none; odata.streaming=true; charset=utf-8'\n", |
93 | | - " 'Content-Encoding': 'REDACTED'\n", |
94 | | - " 'Vary': 'REDACTED'\n", |
95 | | - " 'Server': 'Microsoft-IIS/10.0'\n", |
96 | | - " 'Strict-Transport-Security': 'REDACTED'\n", |
97 | | - " 'Preference-Applied': 'REDACTED'\n", |
98 | | - " 'OData-Version': 'REDACTED'\n", |
99 | | - " 'request-id': '6a968312-a735-11ef-a762-0242ac110002'\n", |
100 | | - " 'elapsed-time': 'REDACTED'\n", |
101 | | - " 'Strict-Transport-Security': 'REDACTED'\n", |
102 | | - " 'Date': 'Wed, 20 Nov 2024 11:48:53 GMT'\n", |
103 | | - "INFO:root:Results: []\n", |
104 | | - "INFO:autogen_core:Publishing message of type GroupChatMessage to all subscribers: {'message': ToolCallResultMessage(source='SQL_Query_Cache_Agent', models_usage=None, content=[FunctionExecutionResult(content=\"{'cached_questions': None}\", call_id='call_CSvANg2842Hg57erUpUGssoe')])}\n", |
105 | | - "INFO:autogen_core:Calling message handler for collect_output_messages with message type GroupChatMessage published by SQL_Query_Cache_Agent/3b4d5ab6-7cfa-4179-8079-28bf0d1e0db4\n", |
106 | | - "INFO:autogen_agentchat.events:source='SQL_Query_Cache_Agent' models_usage=None content=[FunctionExecutionResult(content=\"{'cached_questions': None}\", call_id='call_CSvANg2842Hg57erUpUGssoe')]\n", |
107 | | - "INFO:httpx:HTTP Request: POST https://aoai-text2sql-adi.openai.azure.com/openai/deployments/gpt-4o-mini/chat/completions?api-version=2024-08-01-preview \"HTTP/1.1 500 model_error\"\n", |
108 | | - "INFO:openai._base_client:Retrying request to /chat/completions in 0.951392 seconds\n", |
109 | | - "INFO:httpx:HTTP Request: POST https://aoai-text2sql-adi.openai.azure.com/openai/deployments/gpt-4o-mini/chat/completions?api-version=2024-08-01-preview \"HTTP/1.1 500 model_error\"\n", |
110 | | - "INFO:openai._base_client:Retrying request to /chat/completions in 1.995870 seconds\n" |
111 | | - ] |
112 | | - } |
113 | | - ], |
| 36 | + "outputs": [], |
114 | 37 | "source": [ |
115 | 38 | "result = await SELECTOR.run(task=\"What are the total number of sales within 2008?\")" |
116 | 39 | ] |
|
124 | 47 | "print(result.messages[-1].content)" |
125 | 48 | ] |
126 | 49 | }, |
127 | | - { |
128 | | - "cell_type": "code", |
129 | | - "execution_count": null, |
130 | | - "metadata": {}, |
131 | | - "outputs": [], |
132 | | - "source": [] |
133 | | - }, |
134 | 50 | { |
135 | 51 | "cell_type": "code", |
136 | 52 | "execution_count": null, |
|
0 commit comments