You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add model selection
This adds an optional model property to the prompt file, allowing the prompt developer to specify which model it should be executed against
* Add model configuration to documentation
Copy file name to clipboardExpand all lines: README.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ A complete prompt file would look like this.
19
19
20
20
```yaml
21
21
name: Example
22
+
model: gpt-4o
22
23
config:
23
24
outputFormat: text
24
25
temperature: 0.9
@@ -52,6 +53,16 @@ The `name` is optional in the configuration, if it's not provided then the name
52
53
53
54
If you use this property then when the file is loaded the name is converted to lowercase and spaces are replaced with hyphens. So a name of `My cool Prompt` would become `my-cool-prompt`. This is done to make sure the name is easily accessible from the code.
54
55
56
+
### Model
57
+
58
+
This is another optional item in the configuration, but it provides information to the user of the prompt file which model (or deployment for Azure Open AI) it should use. As this can be null if not specified this the consumer should make sure to check before usage. For example:
59
+
60
+
```csharp
61
+
var model = promptFile.Model ?? "my-default";
62
+
```
63
+
64
+
Using this option though allows the prompt engineer to be very explicit about which model they intended to be used to provide the best results.
65
+
55
66
### Config
56
67
57
68
The `config` section has some top level items which are provided for the client to use in their LLM calls to set options on each call. The `outputFormat` property takes a value of either `text` or `json` depending on how the LLM is intended to respond to the request. If specifying `json` then some LLMs require either the system or user prompt to state that the expected output is JSON as well. If the library does not detect the term `JSON` in the prompt then it will append a small statement to the system prompt requesting for the response to be in JSON format.
0 commit comments