Skip to content

Commit

Permalink
Remove agent transcript
Browse files Browse the repository at this point in the history
  • Loading branch information
bilgeyucel committed Nov 12, 2024
1 parent fd8ca58 commit c203817
Showing 1 changed file with 6 additions and 235 deletions.
241 changes: 6 additions & 235 deletions notebooks/multimodal_agent_with_fastrag_haystack.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": null,
"id": "wmvnG_Cj308Y",
"metadata": {
"colab": {
Expand All @@ -583,75 +583,7 @@
"id": "wmvnG_Cj308Y",
"outputId": "ddb5a36e-6f19-46f2-c5c5-b8f1cc84a39b"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Agent Agent started with {'query': 'What is the fat content of the protein bar?', 'params': None}\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Both `max_new_tokens` (=100) and `max_length`(=32000) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mThought: \u001b[0m\u001b[32mI \u001b[0m\u001b[32mneed \u001b[0m\u001b[32mto \u001b[0m\u001b[32mfind \u001b[0m\u001b[32mout \u001b[0m\u001b[32mthe \u001b[0m\u001b[32mfat \u001b[0m\u001b[32mcontent \u001b[0m\u001b[32mof \u001b[0m\u001b[32ma \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32m\u001b[0m\u001b[32mbar.\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mTool: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mnutrition_tool\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32mTool \u001b[0m\u001b[32m\u001b[0m\u001b[32mInput: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m{\"input\": \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\"protein \u001b[0m\u001b[32m\u001b[0m\u001b[32mbar\"}\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mObservation:\n",
"\u001b[0m"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "1c7431c5222645499f48ad9da40db038",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Batches: 0%| | 0/1 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Observation: \u001b[33m\n",
"Image: <|image_\n",
"This image shows: Protein bar with chocolate peanut butter nutrition facts per bar (50g)\n",
"\u001b[0m\n",
"Thought: "
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Both `max_new_tokens` (=100) and `max_length`(=32000) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mThought: \u001b[0m\u001b[32mI \u001b[0m\u001b[32mhave \u001b[0m\u001b[32mfound \u001b[0m\u001b[32mthe \u001b[0m\u001b[32mfat \u001b[0m\u001b[32mcontent \u001b[0m\u001b[32mof \u001b[0m\u001b[32mthe \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32m\u001b[0m\u001b[32mbar.\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32mFinal \u001b[0m\u001b[32m\u001b[0m\u001b[32mAnswer: \u001b[0m\u001b[32mThe \u001b[0m\u001b[32mfat \u001b[0m\u001b[32mcontent \u001b[0m\u001b[32mof \u001b[0m\u001b[32mthe \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32mbar \u001b[0m\u001b[32mis \u001b[0m\u001b[32m\u001b[0m\u001b[32m8 \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mgrams.<|end|>\n",
"\u001b[0m"
]
}
],
"outputs": [],
"source": [
"agent_response = multimodal_agent.run(\"What is the fat content of the protein bar?\")\n",
"print(agent_response[\"transcript\"])"
Expand Down Expand Up @@ -704,7 +636,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": null,
"id": "_gE0wIU2_iJB",
"metadata": {
"colab": {
Expand All @@ -727,75 +659,7 @@
"id": "_gE0wIU2_iJB",
"outputId": "ebf41d56-aa27-4861-ef32-00a652bb3ae6"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Agent Agent started with {'query': 'How many calories does cheerios have?', 'params': None}\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Both `max_new_tokens` (=100) and `max_length`(=32000) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mThought: \u001b[0m\u001b[32mI \u001b[0m\u001b[32mneed \u001b[0m\u001b[32mto \u001b[0m\u001b[32mfind \u001b[0m\u001b[32mout \u001b[0m\u001b[32mthe \u001b[0m\u001b[32m\u001b[0m\u001b[32mcalorie \u001b[0m\u001b[32mcontent \u001b[0m\u001b[32mof \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mcheerios.\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mTool: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mnutrition_tool\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32mTool \u001b[0m\u001b[32m\u001b[0m\u001b[32mInput: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m{\"input\": \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\"cheerios\"}\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mObservation:\n",
"\u001b[0m"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b830930fb4a7494483959b95981267fc",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Batches: 0%| | 0/1 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Observation: \u001b[33m\n",
"Image: <|image_\n",
"This image shows: Cheerios (cereal) nutrition facts per 1 cup\n",
"\u001b[0m\n",
"Thought: "
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Both `max_new_tokens` (=100) and `max_length`(=32000) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mThought: \u001b[0m\u001b[32mI \u001b[0m\u001b[32mhave \u001b[0m\u001b[32mfound \u001b[0m\u001b[32mthe \u001b[0m\u001b[32m\u001b[0m\u001b[32mcalorie \u001b[0m\u001b[32mcontent \u001b[0m\u001b[32mof \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mcheerios.\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32mFinal \u001b[0m\u001b[32m\u001b[0m\u001b[32mAnswer: \u001b[0m\u001b[32mThe \u001b[0m\u001b[32m\u001b[0m\u001b[32mcalorie \u001b[0m\u001b[32mcontent \u001b[0m\u001b[32mof \u001b[0m\u001b[32m\u001b[0m\u001b[32mcheerios \u001b[0m\u001b[32mis \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m120 \u001b[0m\u001b[32m\u001b[0m\u001b[32mcalories \u001b[0m\u001b[32mper \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mcup.<|end|>\n",
"\u001b[0m"
]
}
],
"outputs": [],
"source": [
"agent_response = multimodal_agent.run(\"How many calories do cheerios have?\")\n",
"print(agent_response[\"transcript\"])"
Expand Down Expand Up @@ -840,7 +704,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": null,
"id": "hrCVDCsP5Op7",
"metadata": {
"colab": {
Expand All @@ -863,100 +727,7 @@
"id": "hrCVDCsP5Op7",
"outputId": "6985307b-f33a-4c14-96ff-10baf628430c"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Agent Agent started with {'query': 'Which one has more protein, protein bar or yogurt?', 'params': None}\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Both `max_new_tokens` (=100) and `max_length`(=32000) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mThought: \u001b[0m\u001b[32mI \u001b[0m\u001b[32mneed \u001b[0m\u001b[32mto \u001b[0m\u001b[32mcompare \u001b[0m\u001b[32mthe \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32mcontent \u001b[0m\u001b[32mof \u001b[0m\u001b[32ma \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32mbar \u001b[0m\u001b[32mand \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32myogurt.\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mTool: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mnutrition_tool\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32mTool \u001b[0m\u001b[32m\u001b[0m\u001b[32mInput: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m{\"input\": \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\"protein \u001b[0m\u001b[32m\u001b[0m\u001b[32mbar\"}\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mObservation:\n",
"\u001b[0m"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Both `max_new_tokens` (=100) and `max_length`(=32000) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mThought: \u001b[0m\u001b[32mI \u001b[0m\u001b[32mneed \u001b[0m\u001b[32mto \u001b[0m\u001b[32mfind \u001b[0m\u001b[32mout \u001b[0m\u001b[32mthe \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32mcontent \u001b[0m\u001b[32mof \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32myogurt.\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mTool: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mnutrition_tool\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32mTool \u001b[0m\u001b[32m\u001b[0m\u001b[32mInput: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m{\"input\": \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\"yogurt\"}\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mObservation:\n",
"\u001b[0m"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "996f3ffc58234ef8a40dfffadd7fbc36",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Batches: 0%| | 0/1 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Observation: \u001b[33m\n",
"Image: <|image_\n",
"This image shows: Greek style yoghurt nutrition facts per serving\n",
"\u001b[0m\n",
"Thought: "
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Both `max_new_tokens` (=100) and `max_length`(=32000) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mThought: \u001b[0m\u001b[32mI \u001b[0m\u001b[32mhave \u001b[0m\u001b[32mfound \u001b[0m\u001b[32mthe \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32mcontent \u001b[0m\u001b[32mof \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32myogurt.\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32mFinal \u001b[0m\u001b[32m\u001b[0m\u001b[32mAnswer: \u001b[0m\u001b[32mThe \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32mcontent \u001b[0m\u001b[32mof \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32myogurt \u001b[0m\u001b[32mis \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m18 \u001b[0m\u001b[32m\u001b[0m\u001b[32mgrams \u001b[0m\u001b[32mper \u001b[0m\u001b[32m\u001b[0m\u001b[32mcup.\n",
"\u001b[0m\u001b[32m\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mComparing \u001b[0m\u001b[32mthe \u001b[0m\u001b[32m\u001b[0m\u001b[32mtwo:\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m- \u001b[0m\u001b[32m\u001b[0m\u001b[32mProtein \u001b[0m\u001b[32m\u001b[0m\u001b[32mbar: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m14 \u001b[0m\u001b[32m\u001b[0m\u001b[32mgrams\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m- \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mYogurt: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m18 \u001b[0m\u001b[32m\u001b[0m\u001b[32mgrams\n",
"\u001b[0m\u001b[32m\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mThought: \u001b[0m\u001b[32mThe \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32myogurt \u001b[0m\u001b[32mhas \u001b[0m\u001b[32mmore \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32mthan \u001b[0m\u001b[32mthe \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32m\u001b[0m\u001b[32mbar.\n",
"\u001b[0m\u001b[32m\u001b[0m\u001b[32mFinal \u001b[0m\u001b[32m\u001b[0m\u001b[32mAnswer: \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mYogurt \u001b[0m\u001b[32mhas \u001b[0m\u001b[32mmore \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32mthan \u001b[0m\u001b[32mthe \u001b[0m\u001b[32mprotein \u001b[0m\u001b[32m\u001b[0m\u001b[32m\u001b[0m\u001b[32mbar.<|end|>\n",
"\u001b[0m"
]
}
],
"outputs": [],
"source": [
"agent_response = multimodal_agent.run(\"Which one has more protein, protein bar or yogurt?\")\n",
"print(agent_response[\"transcript\"])"
Expand Down

0 comments on commit c203817

Please sign in to comment.