|
1 | 1 | {
|
2 | 2 | "cells": [
|
| 3 | + { |
| 4 | + "cell_type": "code", |
| 5 | + "execution_count": 8, |
| 6 | + "id": "d8495fd8-cd0a-406f-8f20-f6b66fd585fe", |
| 7 | + "metadata": {}, |
| 8 | + "outputs": [ |
| 9 | + { |
| 10 | + "name": "stdout", |
| 11 | + "output_type": "stream", |
| 12 | + "text": [ |
| 13 | + "\u001b[33mWARNING: You are using pip version 20.2.3; however, version 24.2 is available.\n", |
| 14 | + "You should consider upgrading via the '/Users/preetamjoshi/projects/aimon/pj_aimon_rely/examples/chatbot/chtbot/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n" |
| 15 | + ] |
| 16 | + } |
| 17 | + ], |
| 18 | + "source": [ |
| 19 | + "!pip install langchain langchain-community --quiet" |
| 20 | + ] |
| 21 | + }, |
3 | 22 | {
|
4 | 23 | "cell_type": "code",
|
5 | 24 | "execution_count": 1,
|
|
18 | 37 | "outputs": [],
|
19 | 38 | "source": [
|
20 | 39 | "import os\n",
|
21 |
| - "openai_api_key = os.getenv(\"OPEN_AI_KEY\")" |
| 40 | + "openai_api_key = os.getenv(\"OPENAI_API_KEY\")" |
22 | 41 | ]
|
23 | 42 | },
|
24 | 43 | {
|
|
29 | 48 | "outputs": [],
|
30 | 49 | "source": [
|
31 | 50 | "analyze_eval = AnalyzeEval(\n",
|
32 |
| - " Application(\"app_jun18_2024\"),\n", |
| 51 | + " Application(\"decorator_app_test\"),\n", |
33 | 52 | " Model(\"my_gpt4_model_fine_tuned\", \"GPT-4\"), \n",
|
34 | 53 | " api_key=os.getenv(\"AIMON_API_KEY\"),\n",
|
35 | 54 | " evaluation_name=\"simple_eval\",\n",
|
|
39 | 58 | },
|
40 | 59 | {
|
41 | 60 | "cell_type": "code",
|
42 |
| - "execution_count": 4, |
| 61 | + "execution_count": 5, |
43 | 62 | "id": "d5c3e5f0-7611-4e44-ba32-b721fba56218",
|
44 | 63 | "metadata": {},
|
45 | 64 | "outputs": [],
|
46 | 65 | "source": [
|
47 | 66 | "analyze_prod = AnalyzeProd(\n",
|
48 |
| - " Application(\"llm_marketing_summarization_app\"), \n", |
| 67 | + " Application(\"decorator_app_prod\"), \n", |
49 | 68 | " Model(\"my_gpt4_model_v2\", \"GPT-4\"), \n",
|
50 | 69 | " values_returned=[\"context\", \"generated_text\"],\n",
|
51 | 70 | " api_key=os.getenv(\"AIMON_API_KEY\")\n",
|
|
64 | 83 | },
|
65 | 84 | {
|
66 | 85 | "cell_type": "code",
|
67 |
| - "execution_count": 5, |
| 86 | + "execution_count": 4, |
68 | 87 | "id": "af98abfc-c04d-4cc7-ba3c-62f550de0c99",
|
69 | 88 | "metadata": {},
|
70 | 89 | "outputs": [],
|
|
97 | 116 | },
|
98 | 117 | {
|
99 | 118 | "cell_type": "code",
|
100 |
| - "execution_count": 6, |
| 119 | + "execution_count": 5, |
101 | 120 | "id": "bcdddfa8-43c7-446a-9337-3ad0f16a015e",
|
102 | 121 | "metadata": {},
|
103 | 122 | "outputs": [
|
104 | 123 | {
|
105 | 124 | "name": "stderr",
|
106 | 125 | "output_type": "stream",
|
107 | 126 | "text": [
|
108 |
| - "/Users/preetamjoshi/projects/aimon/pj_aimon_rely/examples/mflow/lib/python3.9/site-packages/langchain_core/_api/deprecation.py:139: LangChainDeprecationWarning: The class `OpenAI` was deprecated in LangChain 0.0.10 and will be removed in 0.3.0. An updated version of the class exists in the langchain-openai package and should be used instead. To use it run `pip install -U langchain-openai` and import as `from langchain_openai import OpenAI`.\n", |
| 127 | + "/Users/preetamjoshi/projects/aimon/pj_aimon_rely/examples/chatbot/chtbot/lib/python3.9/site-packages/langchain_core/_api/deprecation.py:139: LangChainDeprecationWarning: The class `OpenAI` was deprecated in LangChain 0.0.10 and will be removed in 0.3.0. An updated version of the class exists in the langchain-openai package and should be used instead. To use it run `pip install -U langchain-openai` and import as `from langchain_openai import OpenAI`.\n", |
109 | 128 | " warn_deprecated(\n",
|
110 |
| - "/Users/preetamjoshi/projects/aimon/pj_aimon_rely/examples/mflow/lib/python3.9/site-packages/langchain_core/_api/deprecation.py:139: LangChainDeprecationWarning: The method `Chain.run` was deprecated in langchain 0.1.0 and will be removed in 0.3.0. Use invoke instead.\n", |
| 129 | + "/Users/preetamjoshi/projects/aimon/pj_aimon_rely/examples/chatbot/chtbot/lib/python3.9/site-packages/langchain_core/_api/deprecation.py:139: LangChainDeprecationWarning: The method `Chain.run` was deprecated in langchain 0.1.0 and will be removed in 0.3.0. Use invoke instead.\n", |
111 | 130 | " warn_deprecated(\n"
|
112 | 131 | ]
|
113 | 132 | }
|
|
118 | 137 | },
|
119 | 138 | {
|
120 | 139 | "cell_type": "code",
|
121 |
| - "execution_count": 7, |
| 140 | + "execution_count": 6, |
122 | 141 | "id": "d6e94b08-0e2a-4860-a4f2-30d9ddea17af",
|
123 | 142 | "metadata": {},
|
124 | 143 | "outputs": [
|
125 | 144 | {
|
126 | 145 | "name": "stdout",
|
127 | 146 | "output_type": "stream",
|
128 | 147 | "text": [
|
129 |
| - "[(' Acme recently launched version 2.1 of their Python library, which has deep integrations with the Python ecosystem and has been proven to be beneficial for developers. This new version includes features like async support and improved error handling.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), ('\\n\\nTo configure the Acme python client, follow the official documentation which includes setting up environment variables and installing dependencies for both basic and advanced setups.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), (' The Acme python client is compatible with Python 3.6+ and multiple databases, including MySQL, PostgreSQL, and MongoDB. It is also suitable for cross-language projects with Node.js.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), (' The Acme python client may have installation, package conflicts, and connectivity issues. Troubleshooting involves checking the Python environment, dependencies, and log files, with specific error resolutions available in the online help section.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), (' Acme recently launched version 2.1 of their Python library, which has deep integrations with the Python ecosystem and has been proven to be beneficial for developers. This new version includes features like async support and improved error handling.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), ('\\n\\nTo configure the Acme python client, follow the official documentation which includes setting up environment variables and installing dependencies for both basic and advanced setups.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), (' The Acme python client is compatible with Python 3.6+ and multiple databases, including MySQL, PostgreSQL, and MongoDB. It is also suitable for cross-language projects with Node.js.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), (' The Acme python client may have installation, package conflicts, and connectivity issues. Troubleshooting involves checking the Python environment, dependencies, and log files, with specific error resolutions available in the online help section.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.'))]\n" |
| 148 | + "[(' Acme recently launched version 2.1 of their Python library, which has deep integrations with the Python ecosystem and has been proven to be valuable for developers. This new version includes features like async support and improved error handling. Acme also supports Javascript and Java.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), ('\\n\\nTo configure the Acme python client, follow the official documentation which includes setting up environment variables and installing dependencies for both basic and advanced setups.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), (' The Acme python client is compatible with Python 3.6+ and multiple databases, including MySQL, PostgreSQL, and MongoDB. It is also suitable for cross-language projects with Node.js.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), (' The Acme python client may have installation, package conflicts, and connectivity issues. Troubleshooting involves checking the Python environment, dependencies, and log files, with specific error resolutions available in the online help section.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), (' Acme recently launched version 2.1 of their Python library, which has deep integrations with the Python ecosystem and has been proven to be valuable for developers. This new version includes features like async support and improved error handling. Acme also supports Javascript and Java.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), ('\\n\\nTo configure the Acme python client, follow the official documentation which includes setting up environment variables and installing dependencies for both basic and advanced setups.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), (' The Acme python client is compatible with Python 3.6+ and multiple databases, including MySQL, PostgreSQL, and MongoDB. It is also suitable for cross-language projects with Node.js.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.')), (' The Acme python client may have installation, package conflicts, and connectivity issues. Troubleshooting involves checking the Python environment, dependencies, and log files, with specific error resolutions available in the online help section.', AnalyzeCreateResponse(message='Data successfully sent to AIMon.'))]\n" |
130 | 149 | ]
|
131 | 150 | }
|
132 | 151 | ],
|
|
146 | 165 | },
|
147 | 166 | {
|
148 | 167 | "cell_type": "code",
|
149 |
| - "execution_count": 8, |
| 168 | + "execution_count": 12, |
150 | 169 | "id": "44438e7f-5652-46b5-9244-cbf2977d9d48",
|
151 | 170 | "metadata": {},
|
152 | 171 | "outputs": [],
|
|
174 | 193 | },
|
175 | 194 | {
|
176 | 195 | "cell_type": "code",
|
177 |
| - "execution_count": 9, |
| 196 | + "execution_count": 13, |
178 | 197 | "id": "bb81a8ad-e10a-43f5-9682-844d9ab2ccb4",
|
179 | 198 | "metadata": {},
|
180 | 199 | "outputs": [],
|
|
194 | 213 | },
|
195 | 214 | {
|
196 | 215 | "cell_type": "code",
|
197 |
| - "execution_count": 11, |
| 216 | + "execution_count": 14, |
198 | 217 | "id": "1e0dc9d7-e0b0-4a05-8967-0e06179486a3",
|
199 | 218 | "metadata": {},
|
200 | 219 | "outputs": [],
|
|
204 | 223 | },
|
205 | 224 | {
|
206 | 225 | "cell_type": "code",
|
207 |
| - "execution_count": 12, |
| 226 | + "execution_count": 15, |
208 | 227 | "id": "5515eafd-8644-4792-a69e-23625a026c6c",
|
209 | 228 | "metadata": {},
|
210 | 229 | "outputs": [
|
|
0 commit comments