Skip to content

Commit c656e80

Browse files
authored
dir references updated (#379)
1 parent 50bac38 commit c656e80

File tree

2 files changed

+60
-11
lines changed

2 files changed

+60
-11
lines changed
140 KB
Loading

markdown/sierra-digital-workshop/sierra-digital-workshop.md

Lines changed: 60 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ We'll be tackling each of the components one-by-one with the above as the final
2929
## Prerequisites
3030
Duration: 0:10:00
3131

32-
Please ensure your environment is ready with the following:
32+
If using GitHub Codespaces, the only requirement is you need a Github account and an LLM model/key. Navigate to this [GitHub Repo](https://github.com/SolaceDev/solace-developer-workshops/tree/main) to start the Codespace.
33+
34+
![GitHub Codespaces](img/github-repo.png)
35+
36+
It will take a moment for the Codespace to start up, so let that run in the background.
37+
38+
39+
40+
If using your own laptop/environment, please ensure it is ready with the following:
3341
* Solace Cloud trial account
3442
* GitHub access
3543
* LLM model & key
@@ -87,6 +95,7 @@ The SAM CLI provides the scaffolding commands to initialize and create SAM compo
8795
> python --version
8896
> ```
8997
98+
9099
## Initialize SAM
91100
Duration: 00:20:00
92101
@@ -157,6 +166,19 @@ Now back to your terminal window, lets investigate the directories. Open your di
157166
1. `.env`: environment variables
158167
1. `.sam`: plugins templates
159168
169+
One change we need to make is the artifacts directory. Under your sam-workshop directory, create artifacts.
170+
```
171+
mkdir artifacts # < Create the artifacts directory
172+
```
173+
174+
In the shared_config.yaml file, change the artifacts base_path on line 105 to our new directory.
175+
```
176+
# Default artifact service configuration
177+
artifact_service: &default_artifact_service
178+
type: "filesystem"
179+
base_path: "artifacts" # < Modify this line
180+
artifact_scope: namespace
181+
```
160182
161183
## Running SAM
162184
Duration: 00:10:00
@@ -199,7 +221,7 @@ This command:
199221
* Installs the sam-sql-database plugin
200222
* Creates a new agent configuration file at configs/agents/employee-info.yaml
201223
202-
In the configuration file, we need to modify the directory path so the agent can find the CSVs for our database tables. Update line 93-94 with the directory of your CSVs.
224+
In the configuration file that was created with plugin installation, we need to modify the directory path so the agent can find the CSVs for our database tables. Update line 93-94 with the directory of your CSVs.
203225
```
204226
csv_files: # Optional: List of CSV file paths to import on startup
205227
# - "/path/to/your/data/customers.csv"
@@ -208,7 +230,20 @@ In the configuration file, we need to modify the directory path so the agent can
208230
- "employee-info" # < Add this line
209231
```
210232
211-
The SQL database agent will take the CSVs in the configured directory and create a local SQLite database. Let's put our employees.csv in a directory called employee-info.
233+
The SQL database agent will take the CSVs in the configured directory and create a local SQLite database. Let's put our employees.csv document in a directory with matching name.
234+
```
235+
mkdir employee-info # < Create the employee-info directory
236+
cp ../sam-resources/employees.csv ./employee-info/
237+
```
238+
239+
We also need to change the artifacts base_path on line 43.
240+
```
241+
# Default artifact service configuration
242+
artifact_service: &default_artifact_service
243+
type: "filesystem"
244+
base_path: "artifacts" # < Modify this line
245+
artifact_scope: namespace # Or "namespace", "app", "custom"
246+
```
212247
213248
### Updating the Environment Variables for the SQL Database Agent
214249
We next need to update out environment variables; in your .env file, add the following:
@@ -219,6 +254,8 @@ EMPLOYEE_INFO_DB_PURPOSE="Maintenance Technician Employee Database"
219254
EMPLOYEE_INFO_DB_DESCRIPTION="Database containing information about Oil & Gas Company"
220255
```
221256
257+
These variables are referenced in the agent configuration file.
258+
222259
### Running SAM with the SQL Database Agent
223260
Run SAM again with the newly added agent.
224261
@@ -272,43 +309,55 @@ Once your account is verified, you can create a cluster. You should be able to f
272309
### Using a Qdrant Docker Container
273310
Get the Qdrant docker image from [Docker Hub](https://hub.docker.com/r/qdrant/qdrant).
274311
```
275-
docker pull qdrant/qdrant:<tag>
312+
docker pull qdrant/qdrant:latest
276313
```
277314
278315
Run the Qdrant container using the following run command.
279316
```
280-
docker run -it -p 6333:6333 -p 6334:6334 -v qdrant_storage:/qdrant/storage -v ./qdrant_config:/qdrant/config -e QDRANT__SERVICE__GRPC_PORT=6334 --name qdrant qdrant/qdrant:<tag>
317+
docker run -it -p 6333:6333 -p 6334:6334 -v qdrant_storage:/qdrant/storage -v ./qdrant_config:/qdrant/config -e QDRANT__SERVICE__GRPC_PORT=6334 --name qdrant qdrant/qdrant:latest
281318
```
282319
Modify line 159 of the configs/agents/sop-rag.yaml file to comment out the API Key.
283320
```
284321
vector_db:
285322
db_type: "qdrant"
286323
db_params:
287324
url: "${QDRANT_URL}"
288-
#api_key: "${QDRANT_API_KEY}"
325+
#api_key: "${QDRANT_API_KEY}" # < Comment out this line
289326
collection_name: "${QDRANT_COLLECTION}"
290327
embedding_dimension: ${QDRANT_EMBEDDING_DIMENSION}
291328
```
292329
293330
Your Qdrant URL will likely be http://localhost:6333 - take note of this for the environment variables configuration in the next step.
294331
332+
We also need to change the artifacts base_path on line 45 of the agent configuration file.
333+
```
334+
# Default artifact service configuration
335+
artifact_service: &default_artifact_service
336+
type: "filesystem"
337+
base_path: "artifacts" # < Modify this line
338+
artifact_scope: namespace # Or "namespace", "app", "custom"
339+
```
340+
295341
### Updating the Environment Variables for the RAG Agent
296342
We next need to update out environment variables; in your .env file, add the following:
297343
```
298344
OPENAI_EMBEDDING_MODEL="<embedding-model>"
299345
OPENAI_API_KEY="<llm-key>"
300346
OPENAI_API_ENDPOINT="<llm-url>"
301-
DOCUMENTS_PATH=sop
347+
DOCUMENTS_PATH="sop"
302348
QDRANT_URL="<qdrant-url>"
303-
QDRANT_API_KEY="<qdrant-key>" # This is not needed if using Docker for Qdrant
304-
QDRANT_COLLECTION=sops
349+
QDRANT_API_KEY="<qdrant-key>" # This is not needed if using Docker for Qdrant, so you can comment out this entire line
350+
QDRANT_COLLECTION="sops"
305351
QDRANT_EMBEDDING_DIMENSION=1536
306352
```
307-
308353
> aside positive
309354
> It is possible the Open API Key and Open API Endpoint are the same as the previously configured LLM Key/Endpoint (for example, if using LiteLLM).
310355
311-
Let's put our Standard Operating Procedures document in a directory called sop.
356+
Let's put our Standard Operating Procedures document in a directory called sop, as we referenced in the .env file.
357+
```
358+
mkdir sop # < Create the sop directory
359+
cp ../sam-resources/PipelineOperations.pdf ./sop/
360+
```
312361
313362
### Running SAM with the RAG Agent
314363
Run SAM again with the newly added agent.

0 commit comments

Comments
 (0)