Skip to content

Commit

Permalink
clear output from example notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
the-praxs committed Aug 15, 2024
1 parent dafc5cd commit 25d4909
Showing 1 changed file with 10 additions and 63 deletions.
73 changes: 10 additions & 63 deletions examples/mistral/mistral_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -53,7 +53,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -64,55 +64,19 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"🖇 AgentOps: WARNING: agentops is out of date. Please update with the command: 'pip install --upgrade agentops'\n",
"🖇 AgentOps: \u001b[34m\u001b[34mSession Replay: https://app.agentops.ai/drilldown?session_id=c549f59d-9944-45a7-a5bd-3ada559bad19\u001b[0m\u001b[0m\n"
]
}
],
"outputs": [],
"source": [
"agentops.init(AGENTOPS_API_KEY, default_tags=[\"mistral-example\"])\n",
"client = Mistral(MISTRAL_API_KEY)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The meaning of life is a philosophical question that has been debated for centuries, and it doesn't have one definitive answer as it can vary greatly depending on personal beliefs, religious or spiritual views, and philosophical persuasions. Here are a few perspectives:\n",
"\n",
"1. **Existentialism**: Existentialists like Jean-Paul Sartre and Simone de Beauvoir argued that life has no inherent meaning, and it's up to each individual to create their own purpose.\n",
"\n",
"2. **Religious and Spiritual Perspectives**: Many religions offer their own answers. For example:\n",
" - In Christianity, the purpose of life might be seen as loving and serving God and others, and preparing for eternal life.\n",
" - In Buddhism, the purpose could be achieving enlightenment and escaping the cycle of rebirth.\n",
" - In Hinduism, the purpose might involve fulfilling one's dharma and ultimately achieving Moksha (liberation from the cycle of birth and death).\n",
"\n",
"3. **Hedonism**: Hedonists believe the purpose of life is to seek pleasure and happiness.\n",
"\n",
"4. **Altruism**: Some people find meaning in life through helping others and making the world a better place.\n",
"\n",
"5. **Personal Growth**: Many people find purpose in learning, growing, and becoming the best version of themselves.\n",
"\n",
"6. **Biological Perspective**: From a scientific or biological standpoint, one might say the purpose of life is to survive and reproduce.\n",
"\n",
"7. **The Answer from \"The Hitchhiker's Guide to the Galaxy\"**: In this book by Douglas Adams, the answer to the Ultimate Question of Life, The Universe, and Everything is... 42. It's a humorous and arbitrary answer, highlighting the absurdity of the question.\n",
"\n",
"Ultimately, the meaning of life may be a deeply personal and subjective concept. It could be helpful to reflect on what gives your life purpose and what you're passionate about.\n"
]
}
],
"outputs": [],
"source": [
"response = client.chat.complete(\n",
" model=\"open-mistral-nemo\",\n",
Expand All @@ -127,17 +91,9 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The sum of 2 + 2 is 4.\n"
]
}
],
"outputs": [],
"source": [
"res = client.chat.stream(\n",
" model=\"open-mistral-nemo\",\n",
Expand All @@ -158,18 +114,9 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"🖇 AgentOps: This run's cost $0.00\n",
"🖇 AgentOps: \u001b[34m\u001b[34mSession Replay: https://app.agentops.ai/drilldown?session_id=c549f59d-9944-45a7-a5bd-3ada559bad19\u001b[0m\u001b[0m\n"
]
}
],
"outputs": [],
"source": [
"agentops.end_session(\"Success\")"
]
Expand Down

0 comments on commit 25d4909

Please sign in to comment.