Skip to content

Commit aac67a7

Browse files
authored
Merge pull request #26 from guardrails-ai/060_updates
update for prompt, instructions, msg_history, messages
2 parents c08bef3 + 69d6ef7 commit aac67a7

File tree

10 files changed

+56
-128
lines changed

10 files changed

+56
-128
lines changed

resources/py/docs/CallInputs.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**llm_api** | **str** | The LLM resource targeted by the user. e.g. openai.chat.completions.create | [optional]
99
**llm_output** | **str** | The string output from an external LLM call provided by the user via Guard.parse. | [optional]
10-
**instructions** | **str** | The instructions for chat models. | [optional]
11-
**prompt** | **str** | The prompt for the LLM. | [optional]
12-
**msg_history** | **List[Dict[str, object]]** | The message history for chat models. | [optional]
13-
**prompt_params** | **Dict[str, object]** | Parameters to be formatted into the prompt. | [optional]
10+
**messages** | **List[Dict[str, object]]** | The messages for chat models. | [optional]
11+
**prompt_params** | **Dict[str, object]** | Parameters to be formatted into the messages. | [optional]
1412
**num_reasks** | **int** | The total number of times the LLM can be called to correct output excluding the initial call. | [optional]
1513
**metadata** | **Dict[str, object]** | Additional data to be used by Validators during execution time. | [optional]
1614
**full_schema_reask** | **bool** | Whether to perform reasks for the entire schema rather than for individual fields. | [optional]

resources/py/docs/Inputs.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**llm_api** | **str** | The LLM resource targeted by the user. e.g. openai.chat.completions.create | [optional]
99
**llm_output** | **str** | The string output from an external LLM call provided by the user via Guard.parse. | [optional]
10-
**instructions** | **str** | The instructions for chat models. | [optional]
11-
**prompt** | **str** | The prompt for the LLM. | [optional]
12-
**msg_history** | **List[Dict[str, object]]** | The message history for chat models. | [optional]
13-
**prompt_params** | **Dict[str, object]** | Parameters to be formatted into the prompt. | [optional]
10+
**messages** | **List[Dict[str, object]]** | The messages for chat models. | [optional]
11+
**prompt_params** | **Dict[str, object]** | Parameters to be formatted into the messages. | [optional]
1412
**num_reasks** | **int** | The total number of times the LLM can be called to correct output excluding the initial call. | [optional]
1513
**metadata** | **Dict[str, object]** | Additional data to be used by Validators during execution time. | [optional]
1614
**full_schema_reask** | **bool** | Whether to perform reasks for the entire schema rather than for individual fields. | [optional]

resources/py/docs/ValidatorReference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**id** | **object** | The unique identifier for this Validator. Often the hub id; e.g. guardrails/regex_match |
9-
**on** | [**AnyOfAnyTypeAnyType**](AnyOfAnyTypeAnyType.md) | A reference to the property this validator should be applied against. Can be a valid JSON path or a meta-property such as \"prompt\" or \"output\" | [optional]
9+
**on** | [**AnyOfAnyTypeAnyType**](AnyOfAnyTypeAnyType.md) | A reference to the property this validator should be applied against. Can be a valid JSON path or a meta-property such as \"messages\" or \"output\" | [optional]
1010
**on_fail** | **object** | | [optional]
1111
**args** | [**List[object]**](AnyType.md) | | [optional]
1212
**kwargs** | **Dict[str, object]** | | [optional]

resources/py/pyproject.toml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "guardrails-api-client"
3-
version = "0.3.13"
3+
version = "0.4.0-alpha1"
44
description = "Guardrails API Client."
55
authors = [
66
{name = "Guardrails AI", email = "[email protected]"}

resources/ts/docs/interfaces/CallInputs.md

Lines changed: 20 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ CallInputs
1212

1313
- [args](CallInputs.md#args)
1414
- [fullSchemaReask](CallInputs.md#fullschemareask)
15-
- [instructions](CallInputs.md#instructions)
1615
- [kwargs](CallInputs.md#kwargs)
1716
- [llmApi](CallInputs.md#llmapi)
1817
- [llmOutput](CallInputs.md#llmoutput)
18+
- [messages](CallInputs.md#messages)
1919
- [metadata](CallInputs.md#metadata)
20-
- [msgHistory](CallInputs.md#msghistory)
2120
- [numReasks](CallInputs.md#numreasks)
22-
- [prompt](CallInputs.md#prompt)
2321
- [promptParams](CallInputs.md#promptparams)
2422
- [stream](CallInputs.md#stream)
2523

@@ -35,7 +33,7 @@ CallInputs
3533

3634
#### Defined in
3735

38-
src/models/CallInputs.ts:86
36+
src/models/CallInputs.ts:74
3937

4038
___
4139

@@ -51,23 +49,7 @@ CallInputs
5149

5250
#### Defined in
5351

54-
src/models/CallInputs.ts:74
55-
56-
___
57-
58-
### instructions
59-
60-
`Optional` **instructions**: `string`
61-
62-
The instructions for chat models.
63-
64-
**`Memberof`**
65-
66-
CallInputs
67-
68-
#### Defined in
69-
70-
src/models/CallInputs.ts:38
52+
src/models/CallInputs.ts:62
7153

7254
___
7355

@@ -85,7 +67,7 @@ CallInputs
8567

8668
#### Defined in
8769

88-
src/models/CallInputs.ts:92
70+
src/models/CallInputs.ts:80
8971

9072
___
9173

@@ -121,39 +103,39 @@ src/models/CallInputs.ts:32
121103

122104
___
123105

124-
### metadata
106+
### messages
125107

126-
`Optional` **metadata**: `Object`
108+
`Optional` **messages**: \{ `[key: string]`: `any`; }[]
127109

128-
Additional data to be used by Validators during execution time.
110+
The messages for chat models.
129111

130112
**`Memberof`**
131113

132114
CallInputs
133115

134-
#### Index signature
135-
136-
[key: `string`]: `any`
137-
138116
#### Defined in
139117

140-
src/models/CallInputs.ts:68
118+
src/models/CallInputs.ts:38
141119

142120
___
143121

144-
### msgHistory
122+
### metadata
145123

146-
`Optional` **msgHistory**: \{ `[key: string]`: `any`; }[]
124+
`Optional` **metadata**: `Object`
147125

148-
The message history for chat models.
126+
Additional data to be used by Validators during execution time.
149127

150128
**`Memberof`**
151129

152130
CallInputs
153131

132+
#### Index signature
133+
134+
[key: `string`]: `any`
135+
154136
#### Defined in
155137

156-
src/models/CallInputs.ts:50
138+
src/models/CallInputs.ts:56
157139

158140
___
159141

@@ -169,31 +151,15 @@ CallInputs
169151

170152
#### Defined in
171153

172-
src/models/CallInputs.ts:62
173-
174-
___
175-
176-
### prompt
177-
178-
`Optional` **prompt**: `string`
179-
180-
The prompt for the LLM.
181-
182-
**`Memberof`**
183-
184-
CallInputs
185-
186-
#### Defined in
187-
188-
src/models/CallInputs.ts:44
154+
src/models/CallInputs.ts:50
189155

190156
___
191157

192158
### promptParams
193159

194160
`Optional` **promptParams**: `Object`
195161

196-
Parameters to be formatted into the prompt.
162+
Parameters to be formatted into the messages.
197163

198164
**`Memberof`**
199165

@@ -205,7 +171,7 @@ CallInputs
205171

206172
#### Defined in
207173

208-
src/models/CallInputs.ts:56
174+
src/models/CallInputs.ts:44
209175

210176
___
211177

@@ -221,4 +187,4 @@ CallInputs
221187

222188
#### Defined in
223189

224-
src/models/CallInputs.ts:80
190+
src/models/CallInputs.ts:68

resources/ts/docs/interfaces/Inputs.md

Lines changed: 18 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ Inputs
1111
### Properties
1212

1313
- [fullSchemaReask](Inputs.md#fullschemareask)
14-
- [instructions](Inputs.md#instructions)
1514
- [llmApi](Inputs.md#llmapi)
1615
- [llmOutput](Inputs.md#llmoutput)
16+
- [messages](Inputs.md#messages)
1717
- [metadata](Inputs.md#metadata)
18-
- [msgHistory](Inputs.md#msghistory)
1918
- [numReasks](Inputs.md#numreasks)
20-
- [prompt](Inputs.md#prompt)
2119
- [promptParams](Inputs.md#promptparams)
2220
- [stream](Inputs.md#stream)
2321

@@ -35,23 +33,7 @@ Inputs
3533

3634
#### Defined in
3735

38-
src/models/Inputs.ts:74
39-
40-
___
41-
42-
### instructions
43-
44-
`Optional` **instructions**: `string`
45-
46-
The instructions for chat models.
47-
48-
**`Memberof`**
49-
50-
Inputs
51-
52-
#### Defined in
53-
54-
src/models/Inputs.ts:38
36+
src/models/Inputs.ts:62
5537

5638
___
5739

@@ -87,39 +69,39 @@ src/models/Inputs.ts:32
8769

8870
___
8971

90-
### metadata
72+
### messages
9173

92-
`Optional` **metadata**: `Object`
74+
`Optional` **messages**: \{ `[key: string]`: `any`; }[]
9375

94-
Additional data to be used by Validators during execution time.
76+
The messages for chat models.
9577

9678
**`Memberof`**
9779

9880
Inputs
9981

100-
#### Index signature
101-
102-
[key: `string`]: `any`
103-
10482
#### Defined in
10583

106-
src/models/Inputs.ts:68
84+
src/models/Inputs.ts:38
10785

10886
___
10987

110-
### msgHistory
88+
### metadata
11189

112-
`Optional` **msgHistory**: \{ `[key: string]`: `any`; }[]
90+
`Optional` **metadata**: `Object`
11391

114-
The message history for chat models.
92+
Additional data to be used by Validators during execution time.
11593

11694
**`Memberof`**
11795

11896
Inputs
11997

98+
#### Index signature
99+
100+
[key: `string`]: `any`
101+
120102
#### Defined in
121103

122-
src/models/Inputs.ts:50
104+
src/models/Inputs.ts:56
123105

124106
___
125107

@@ -135,31 +117,15 @@ Inputs
135117

136118
#### Defined in
137119

138-
src/models/Inputs.ts:62
139-
140-
___
141-
142-
### prompt
143-
144-
`Optional` **prompt**: `string`
145-
146-
The prompt for the LLM.
147-
148-
**`Memberof`**
149-
150-
Inputs
151-
152-
#### Defined in
153-
154-
src/models/Inputs.ts:44
120+
src/models/Inputs.ts:50
155121

156122
___
157123

158124
### promptParams
159125

160126
`Optional` **promptParams**: `Object`
161127

162-
Parameters to be formatted into the prompt.
128+
Parameters to be formatted into the messages.
163129

164130
**`Memberof`**
165131

@@ -171,7 +137,7 @@ Inputs
171137

172138
#### Defined in
173139

174-
src/models/Inputs.ts:56
140+
src/models/Inputs.ts:44
175141

176142
___
177143

@@ -187,4 +153,4 @@ Inputs
187153

188154
#### Defined in
189155

190-
src/models/Inputs.ts:80
156+
src/models/Inputs.ts:68

resources/ts/docs/interfaces/ValidatorReference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ ___
7070

7171
`Optional` **on**: `string`
7272

73-
A reference to the property this validator should be applied against. Can be a valid JSON path or a meta-property such as "prompt" or "output"
73+
A reference to the property this validator should be applied against. Can be a valid JSON path or a meta-property such as "messages" or "output"
7474

7575
**`Memberof`**
7676

0 commit comments

Comments
 (0)