Update stop for stop_sequences that is the correct approach
Browse filesstop attribute does not exist for HuggingFace's InterfaceClient. It needs to use stop_sequences attribute instead
dummy_agent_library.ipynb
CHANGED
@@ -489,7 +489,7 @@
|
|
489 |
"output = client.text_generation(\n",
|
490 |
" prompt,\n",
|
491 |
" max_new_tokens=200,\n",
|
492 |
-
"
|
493 |
")\n",
|
494 |
"\n",
|
495 |
"print(output)"
|
|
|
489 |
"output = client.text_generation(\n",
|
490 |
" prompt,\n",
|
491 |
" max_new_tokens=200,\n",
|
492 |
+
" stop_sequences=[\"Observation:\"] # Let's stop before any actual function is called\n",
|
493 |
")\n",
|
494 |
"\n",
|
495 |
"print(output)"
|