Skip to content

Commit f908bc8

Browse files
Slim/sql (#31)
* setup sql agent graph * Refactor the sub-graph prompt injection * Move prompts over to examples * Update graph for sql agent
1 parent 487e16c commit f908bc8

28 files changed

+422
-196
lines changed

graphs/prompts/journals/2024_09_03.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@
4646
- if the project being analyzed is located somewhere other than $PWD then the `--host-dir` will need to be updated.
4747
- [[Running the Prompt Engine]]
4848
- [[Authoring Prompts]]
49-
- ---
50-
id:: 66d7f3ff-8769-40b3-b6b5-fc4fceea879e
49+
- id:: 66d7f3ff-8769-40b3-b6b5-fc4fceea879e
50+
```
51+
---
5152
extractors:
5253
- name: linguist
5354
image: vonwig/go-linguist:latest
@@ -84,4 +85,5 @@
8485
This project contains {{language}} code.
8586
{{/linguist}}
8687
87-
Can you find any language specific project files and list them?
88+
Can you find any language specific project files and list them?
89+
```

graphs/prompts/pages/Authoring Prompts.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ A prompt file can also contain metadata about how to generate and run the prompt
44
{{embed ((66d7f3ff-8769-40b3-b6b5-fc4fceea879e)) }}
55
The example above defines a lot of metadata. A prompt file might also be very simple.
66
{{embed ((66d8a396-9268-4917-882f-da4c52b7b5dd)) }}
7-
Use the [prompt engine]([[Running the Prompt Engine]]) to run this prompt file against an LLM.
7+
Use the [prompt engine]([[Running the Prompt Engine]]) to run this prompt file against an LLM.
8+
- ## Prompt Metadata
9+
-
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
- When defining tools in prompt metadata, users can _interpolate_ tool parameters into the `commands` section of a container definition. For example, in the following definition of a sqlite tool, the `database` and `sql` parameters from the tool definition will be used to create the container.
2+
```
3+
- name: sqlite
4+
description: run the sqlite command
5+
parameters:
6+
type: object
7+
properties:
8+
database:
9+
type: string
10+
description: the path to the database
11+
sql:
12+
type: string
13+
description: the sql statement to run
14+
container:
15+
image: vonwig/sqlite:latest
16+
command:
17+
- "{{database}}"
18+
- "{{sql|safe}}"
19+
```
20+
- You can also splice array parameters into the command definition using the `into` filter keyword:
21+
```
22+
- name: docker
23+
description: run any docker command with arguments
24+
parameters:
25+
type: object
26+
properties:
27+
args:
28+
type: array
29+
items:
30+
type: string
31+
description: arguments to pass to the docker CLI
32+
container:
33+
image: docker:cli
34+
command:
35+
- "{{args|into}}"
36+
```
37+
In this example, the array of strings passed to the `args` parameter of the function will be spliced into the `command` parameter of the container definition.

prompts/dockerfiles/npm-best-practices.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

prompts/dockerfiles_llama3.1/010_system_prompt.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

prompts/dockerfiles_llama3.1/100_user_prompt.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

prompts/dockerfiles_llama3.1/README.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

prompts/dockerfiles_mistral-nemo/010_system_prompt.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

prompts/dockerfiles_mistral-nemo/100_user_prompt.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

prompts/dockerfiles_mistral-nemo/README.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)