Skip to content

Commit

Permalink
[Examples] Fix make command (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
yonishelach authored Nov 12, 2024
1 parent 526ea90 commit 7963ddd
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 38 deletions.
57 changes: 38 additions & 19 deletions examples/agent/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,50 @@
"\n",
"Before you start, make sure you have completed the following steps:\n",
"\n",
"1. Install the required packages:\n",
"```bash\n",
"pip install -r requirements.txt\n",
"```\n",
"\n",
"2. Install mlrun from the feature branch (temporary step):\n",
"```bash\n",
"pip install git+https://github.com/mlrun/genai-factory.git\n",
"```\n",
"\n",
"3. Set the environment variable:"
"1. Install the required packages:"
]
},
{
"metadata": {},
"cell_type": "code",
"execution_count": null,
"source": "!pip install -r requirements.txt",
"outputs": [],
"execution_count": null
},
{
"metadata": {},
"cell_type": "markdown",
"source": [
"\n",
"2. Install mlrun from the feature branch (temporary step):"
]
},
{
"metadata": {},
"cell_type": "code",
"source": "!pip install git+https://github.com/mlrun/genai-factory.git",
"outputs": [],
"execution_count": null
},
{
"metadata": {},
"cell_type": "markdown",
"source": [
"!export GENAI_FACTORY_ENV_PATH=$(pwd)/.env"
"\n",
"\n",
"3. Set the environment variable:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"source": "!export GENAI_FACTORY_ENV_PATH=$(pwd)/.env",
"outputs": [],
"execution_count": null
},
{
"cell_type": "code",
"metadata": {},
"source": [
"%%writefile .env\n",
"\n",
Expand All @@ -64,7 +81,9 @@
"OPENAI_API_KEY=... # Your OpenAI API key\n",
"GENAI_FACTORY_IS_LOCAL_CONFIG=... # Set to 'true' for local configuration\n",
"GENAI_FACTORY_LOCAL_CHROMA=... # Path to local Chroma database (if applicable)"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand All @@ -80,7 +99,7 @@
"metadata": {},
"source": [
"```bash\n",
"make genai-factory\n",
"make up\n",
"```\n",
"\n",
"Run the above command in your terminal to deploy the GenAI Factory."
Expand All @@ -95,13 +114,13 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Deploy the workflow defined in workflow.py\n",
"!genai-factory run workflow.py"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand Down
40 changes: 21 additions & 19 deletions examples/quick_start/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
},
{
"cell_type": "code",
"execution_count": null,
"id": "c38a23e8-76d8-4deb-8893-1335922295c1",
"metadata": {},
"outputs": [],
"source": [
"# Install MLRun from the feature branch\n",
"!pip install git+https://github.com/mlrun/genai-factory.git\n",
"!pip install -r requirements.txt"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand All @@ -44,23 +44,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"id": "7bb4a98dcb31cae1",
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Set the path for the environment file\n",
"!export GENAI_FACTORY_ENV_PATH=$(pwd)/.env"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "code",
"execution_count": null,
"id": "4be63ee2-4ac4-4632-b809-724309f51e",
"metadata": {},
"outputs": [],
"source": [
"%%writefile .env\n",
"\n",
Expand All @@ -69,7 +67,9 @@
"OPENAI_API_KEY=... # Your OpenAI API key\n",
"GENAI_FACTORY_IS_LOCAL_CONFIG=... # Set to 'true' for local configuration\n",
"GENAI_FACTORY_LOCAL_CHROMA=... # Path to local Chroma database (if applicable)"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand All @@ -89,7 +89,7 @@
},
"source": [
"```bash\n",
"make genai-factory\n",
"make up\n",
"```\n",
"\n",
"Run the above command in your terminal to deploy the GenAI Factory."
Expand All @@ -105,14 +105,18 @@
},
{
"cell_type": "code",
"execution_count": null,
"id": "1ddb3bbd-d29b-467e-9526-c93d83e099f4",
"metadata": {},
"outputs": [],
"metadata": {
"jupyter": {
"is_executing": true
}
},
"source": [
"# Deploy the workflow defined in workflow.py\n",
"!genai-factory run workflow.py"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand All @@ -136,11 +140,8 @@
]
},
{
"metadata": {},
"cell_type": "markdown",
"id": "88d5b8ffda9bbe8b",
"metadata": {
"collapsed": false
},
"source": [
"Run the following command in your terminal while inside the **controller container**:\n",
"\n",
Expand All @@ -149,7 +150,8 @@
"```\n",
"\n",
"This command will ingest the MLRun documentation from the specified URL."
]
],
"id": "88d5b8ffda9bbe8b"
},
{
"cell_type": "markdown",
Expand Down

0 comments on commit 7963ddd

Please sign in to comment.