diff --git a/ideas_practice/code/bioasq_yesno_api_tests.ipynb b/ideas_practice/code/bioasq_yesno_api_tests.ipynb index a9f295c522b793c583b1a8ab20f148cf55ab16fd..4e1d84d60cb738eca8f694485a2f1438a748974c 100644 --- a/ideas_practice/code/bioasq_yesno_api_tests.ipynb +++ b/ideas_practice/code/bioasq_yesno_api_tests.ipynb @@ -46,6 +46,39 @@ "print(chat_completion.choices[0].message.content)" ] }, + { + "cell_type": "code", + "execution_count": 5, + "id": "d249618b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sure, I can certainly help you with that. The sum of 5 plus 3 is equal to 8. Let me know if you have any other medical questions that I can assist you with!\n" + ] + } + ], + "source": [ + "#groq example\n", + "chat_completion = clientG.chat.completions.create(\n", + " messages=[\n", + " {\n", + " \"role\": \"system\",\n", + " \"content\": \"You are a medical expert but not good at math\",\n", + " },\n", + " {\n", + " \"role\": \"user\",\n", + " \"content\": \"What is 5 plus 3\",\n", + " }\n", + " ],\n", + " model=\"mixtral-8x7b-32768\",\n", + ")\n", + "\n", + "print(chat_completion.choices[0].message.content)" + ] + }, { "cell_type": "code", "execution_count": 5,