Skip to content

Commit b81bba9

Browse files
authored
pin qwen agent commit due to prompt issue (#2938)
until will not be resolved QwenLM/Qwen-Agent#541 CVS-166556
1 parent 1e5f1a8 commit b81bba9

File tree

1 file changed

+57
-17
lines changed

1 file changed

+57
-17
lines changed

notebooks/llm-agent-functioncall/llm-agent-functioncall-qwen.ipynb

Lines changed: 57 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"source": [
105105
"from cmd_helper import clone_repo\n",
106106
"\n",
107-
"clone_repo(\"https://github.com/QwenLM/Qwen-Agent.git\")\n",
107+
"clone_repo(\"https://github.com/QwenLM/Qwen-Agent.git\", revision=\"v0.0.18\")\n",
108108
"\n",
109109
"%pip install -q -e ./Qwen-Agent/\"[gui]\""
110110
]
@@ -139,7 +139,7 @@
139139
},
140140
{
141141
"cell_type": "code",
142-
"execution_count": 4,
142+
"execution_count": 3,
143143
"id": "e8bfe609-1823-4df7-9a68-f210a58a0d38",
144144
"metadata": {},
145145
"outputs": [],
@@ -170,7 +170,7 @@
170170
},
171171
{
172172
"cell_type": "code",
173-
"execution_count": 5,
173+
"execution_count": 4,
174174
"id": "5ea4ce13",
175175
"metadata": {},
176176
"outputs": [],
@@ -213,7 +213,7 @@
213213
},
214214
{
215215
"cell_type": "code",
216-
"execution_count": 6,
216+
"execution_count": 5,
217217
"id": "981df8fe-cfcf-455a-919e-dda36f3b5dfb",
218218
"metadata": {
219219
"test_replace": {
@@ -229,7 +229,7 @@
229229
"model_path = \"Qwen2-7B-Instruct-ov\"\n",
230230
"\n",
231231
"if not Path(model_path).exists():\n",
232-
" optimum_cli(model_id, model_path, additional_args={\"task\": \"text-generation-with-past\", \"trust-remote-code\": \"\", \"weight-format\": \"int4\", \"ratio\": \"0.72\"})"
232+
" optimum_cli(model_id, model_path, additional_args={\"task\": \"text-generation-with-past\", \"weight-format\": \"int4\", \"ratio\": \"0.72\"})"
233233
]
234234
},
235235
{
@@ -245,10 +245,26 @@
245245
},
246246
{
247247
"cell_type": "code",
248-
"execution_count": null,
248+
"execution_count": 6,
249249
"id": "a1ea3bdb-f97c-4374-880a-2b62abb5baaa",
250250
"metadata": {},
251-
"outputs": [],
251+
"outputs": [
252+
{
253+
"data": {
254+
"application/vnd.jupyter.widget-view+json": {
255+
"model_id": "c513d790b90e4783a8a6222bc90bd1d1",
256+
"version_major": 2,
257+
"version_minor": 0
258+
},
259+
"text/plain": [
260+
"Dropdown(description='Device:', options=('CPU', 'AUTO'), value='CPU')"
261+
]
262+
},
263+
"execution_count": 6,
264+
"metadata": {},
265+
"output_type": "execute_result"
266+
}
267+
],
252268
"source": [
253269
"from notebook_utils import device_widget\n",
254270
"\n",
@@ -307,7 +323,7 @@
307323
},
308324
{
309325
"cell_type": "code",
310-
"execution_count": 6,
326+
"execution_count": 8,
311327
"id": "ee406254",
312328
"metadata": {},
313329
"outputs": [],
@@ -359,7 +375,7 @@
359375
},
360376
{
361377
"cell_type": "code",
362-
"execution_count": 7,
378+
"execution_count": 9,
363379
"id": "4799540b-eee0-491f-a5b6-5bae68c22af9",
364380
"metadata": {},
365381
"outputs": [
@@ -377,11 +393,13 @@
377393
"# User question:\n",
378394
"[{'role': 'user', 'content': \"What's the weather like in San Francisco?\"}]\n",
379395
"# Assistant Response 1:\n",
380-
"[{'role': 'assistant', 'content': '', 'function_call': {'name': 'get_current_weather', 'arguments': '{\"location\": \"San Francisco, CA\"}'}}]\n",
396+
"\n",
397+
"[{'role': 'assistant', 'content': '', 'function_call': {'name': 'get_current_weather', 'arguments': '{\"location\": \"San Francisco, CA\", \"unit\": \"fahrenheit\"}'}}]\n",
381398
"# Function Response:\n",
382399
"{\"location\": \"San Francisco\", \"temperature\": \"72\", \"unit\": \"fahrenheit\"}\n",
383400
"# Assistant Response 2:\n",
384-
"[{'role': 'assistant', 'content': 'The current weather in San Francisco is 72 degrees Fahrenheit.'}]\n"
401+
"\n",
402+
"[{'role': 'assistant', 'content': 'The weather in San Francisco is currently 72°F (21°C).'}]\n"
385403
]
386404
}
387405
],
@@ -473,7 +491,7 @@
473491
},
474492
{
475493
"cell_type": "code",
476-
"execution_count": 8,
494+
"execution_count": 10,
477495
"id": "1f64b67c-1259-4fe6-bfc3-af317bfe04f6",
478496
"metadata": {},
479497
"outputs": [],
@@ -537,7 +555,7 @@
537555
},
538556
{
539557
"cell_type": "code",
540-
"execution_count": 9,
558+
"execution_count": 11,
541559
"id": "ea649d2f-ab4b-4228-8f32-75b01a98d9a7",
542560
"metadata": {},
543561
"outputs": [],
@@ -566,7 +584,7 @@
566584
},
567585
{
568586
"cell_type": "code",
569-
"execution_count": 10,
587+
"execution_count": 12,
570588
"id": "52aed08c-b515-40b5-b371-16e27fb89e60",
571589
"metadata": {},
572590
"outputs": [],
@@ -578,10 +596,32 @@
578596
},
579597
{
580598
"cell_type": "code",
581-
"execution_count": null,
599+
"execution_count": 13,
582600
"id": "752e052d-74d7-4df7-81eb-bbf317196ab1",
583601
"metadata": {},
584-
"outputs": [],
602+
"outputs": [
603+
{
604+
"name": "stdout",
605+
"output_type": "stream",
606+
"text": [
607+
"* Running on local URL: http://127.0.0.1:7860\n",
608+
"\n",
609+
"To create a public link, set `share=True` in `launch()`.\n"
610+
]
611+
},
612+
{
613+
"data": {
614+
"text/html": [
615+
"<div><iframe src=\"http://127.0.0.1:7860/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
616+
],
617+
"text/plain": [
618+
"<IPython.core.display.HTML object>"
619+
]
620+
},
621+
"metadata": {},
622+
"output_type": "display_data"
623+
}
624+
],
585625
"source": [
586626
"if not Path(\"gradio_helper.py\").exists():\n",
587627
" r = requests.get(url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/notebooks/llm-agent-functioncall/gradio_helper.py\")\n",
@@ -617,7 +657,7 @@
617657
"name": "python",
618658
"nbconvert_exporter": "python",
619659
"pygments_lexer": "ipython3",
620-
"version": "3.10.7"
660+
"version": "3.11.4"
621661
},
622662
"openvino_notebooks": {
623663
"imageUrl": "https://github.com/openvinotoolkit/openvino_notebooks/assets/91237924/202cddac-dbbb-493b-ae79-0d45798f75c1",

0 commit comments

Comments
 (0)