adding multi-model function
parent
d4cf235347
commit
aa6119ba63
|
|
@ -164,9 +164,68 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": 10,
|
||||||
"id": "c42495cd-5e8e-48bc-aaea-e36f18b02baf",
|
"id": "c42495cd-5e8e-48bc-aaea-e36f18b02baf",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" llama\n",
|
||||||
|
"Response: It will take 10 hours to dry 5 shirts\n",
|
||||||
|
"\n",
|
||||||
|
"Reasoning: Since it takes 2 hours to dry 1 shirt, you can multiply that time by 5 to get the total drying time for 5 shirts.\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" phi3b8\n",
|
||||||
|
"Response: It would still take approximately 2 hours to dry all five shirts if they are dried simultaneously under optimal conditions.\n",
|
||||||
|
"\n",
|
||||||
|
"Reasoning: Assuming that each of the 5 shirts can be hung up and exposed to sunlight at once without overlapping, it is reasonable to expect them to dry in about the same time as one would take for a single shirt. However, this assumes ideal weather conditions with no cloud cover or rain.\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" phi14b\n",
|
||||||
|
"Response: It would still take 2 hours to dry all 5 shirts if they are dried simultaneously. However, if you can only dry one at a time, then it would take 10 hours.\n",
|
||||||
|
"\n",
|
||||||
|
"Reasoning: The drying time for each shirt is independent of the number of shirts being dried as long as there's enough space to lay them out in the sun without overlapping. If you have sufficient space and can hang all five at once, they will all be dry within 2 hours.\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" deepseek\n",
|
||||||
|
"Response: It will take 10 hours to dry 5 shirts.\n",
|
||||||
|
"\n",
|
||||||
|
"Reasoning: Since it takes 2 hours to dry 1 shirt, for 5 shirts, you would multiply the number of shirts by the time it takes to dry one shirt. So, 5 shirts * 2 hours/shirt = 10 hours.\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" gemma\n",
|
||||||
|
"Response: It will still take approximately 2 hours to dry 5 shirts.\n",
|
||||||
|
"\n",
|
||||||
|
"Reasoning: Drying time depends on factors like sunlight intensity, temperature, and humidity. Assuming these factors remain constant, each shirt dries independently of the others. So, 5 shirts would dry in roughly the same amount of time as one shirt.\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"models = ['llama','phi3b8','phi14b','deepseek','gemma']\n",
|
||||||
|
"\n",
|
||||||
|
"for model in models:\n",
|
||||||
|
" print('\\n\\n',model)\n",
|
||||||
|
" llm = LLMFactory(model)\n",
|
||||||
|
" completion = llm.create_completion(\n",
|
||||||
|
" response_model=CompletionModel,\n",
|
||||||
|
" messages=messages,\n",
|
||||||
|
" )\n",
|
||||||
|
" assert isinstance(completion, CompletionModel)\n",
|
||||||
|
" \n",
|
||||||
|
" print(f\"Response: {completion.response}\\n\")\n",
|
||||||
|
" print(f\"Reasoning: {completion.reasoning}\")"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "53fc3412-506e-4c4e-8670-320e2980b3f5",
|
||||||
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": []
|
"source": []
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue