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
Copy file name to clipboardExpand all lines: daprdocs/content/en/reference/api/conversation_api.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,33 +32,33 @@ POST http://localhost:<daprPort>/v1.0-alpha2/conversation/<llm-name>/converse
32
32
33
33
| Field | Description |
34
34
| --------- | ----------- |
35
-
|`context_id`| The ID of an existing chat (like in ChatGPT). Optional |
35
+
|`contextId`| The ID of an existing chat (like in ChatGPT). Optional |
36
36
|`inputs`| Inputs for the conversation. Multiple inputs at one time are supported. Required |
37
37
|`parameters`| Parameters for all custom fields. Optional |
38
38
|`metadata`| Metadata passed to conversation components. Optional |
39
-
|`scrub_pii`| A boolean value to enable obfuscation of sensitive information returning from the LLM. Optional |
39
+
|`scrubPii`| A boolean value to enable obfuscation of sensitive information returning from the LLM. Optional |
40
40
|`temperature`| A float value to control the temperature of the model. Used to optimize for consistency (0) or creativity (1). Optional |
41
41
|`tools`| Tools register the tools available to be used by the LLM during the conversation. Optional |
42
-
|`tool_choice`| Controls which (if any) tool is called by the model. Values: `auto`, `required`, or specific tool name. Defaults to `auto` if tools are present. Optional |
42
+
|`toolChoice`| Controls which (if any) tool is called by the model. Values: `auto`, `required`, or specific tool name. Defaults to `auto` if tools are present. Optional |
43
43
44
44
#### Input body
45
45
46
46
| Field | Description |
47
47
| --------- | ----------- |
48
48
|`messages`| Array of conversation messages. Required |
49
-
|`scrub_pii`| A boolean value to enable obfuscation of sensitive information present in the content field. Optional |
49
+
|`scrubPii`| A boolean value to enable obfuscation of sensitive information present in the content field. Optional |
50
50
51
51
#### Message types
52
52
53
53
The API supports different message types:
54
54
55
55
| Type | Description |
56
56
| ---- | ----------- |
57
-
|`of_developer`| Developer role messages with optional name and content |
58
-
|`of_system`| System role messages with optional name and content |
59
-
|`of_user`| User role messages with optional name and content |
60
-
|`of_assistant`| Assistant role messages with optional name, content, and tool calls |
61
-
|`of_tool`| Tool role messages with tool ID, name, and content |
57
+
|`ofDeveloper`| Developer role messages with optional name and content |
58
+
|`ofSystem`| System role messages with optional name and content |
59
+
|`ofUser`| User role messages with optional name and content |
60
+
|`ofAssistant`| Assistant role messages with optional name, content, and tool calls |
61
+
|`ofTool`| Tool role messages with tool ID, name, and content |
62
62
63
63
64
64
#### Tool calling
@@ -74,7 +74,7 @@ Tools can be defined using the `tools` field with function definitions:
74
74
75
75
#### Tool choice options
76
76
77
-
The `tool_choice` is an optional parameter that controls how the model can use available tools:
77
+
The `toolChoice` is an optional parameter that controls how the model can use available tools:
78
78
79
79
-**`auto`**: The model can pick between generating a message or calling one or more tools (default when tools are present)
80
80
-**`required`**: Requires one or more functions to be called
@@ -122,7 +122,7 @@ curl -X POST http://localhost:3500/v1.0-alpha2/conversation/openai/converse \
122
122
{
123
123
"messages": [
124
124
{
125
-
"of_user": {
125
+
"ofUser": {
126
126
"content": [
127
127
{
128
128
"text": "What is Dapr?"
@@ -148,7 +148,7 @@ curl -X POST http://localhost:3500/v1.0-alpha2/conversation/openai/converse \
148
148
{
149
149
"messages": [
150
150
{
151
-
"of_user": {
151
+
"ofUser": {
152
152
"content": [
153
153
{
154
154
"text": "What is the weather like in San Francisco in celsius?"
@@ -157,7 +157,7 @@ curl -X POST http://localhost:3500/v1.0-alpha2/conversation/openai/converse \
157
157
}
158
158
}
159
159
],
160
-
"scrub_pii": false
160
+
"scrubPii": false
161
161
}
162
162
],
163
163
"parameters": {
@@ -174,7 +174,7 @@ curl -X POST http://localhost:3500/v1.0-alpha2/conversation/openai/converse \
174
174
"api_key": "test-key",
175
175
"version": "1.0"
176
176
},
177
-
"scrub_pii": false,
177
+
"scrubPii": false,
178
178
"temperature": 0.7,
179
179
"tools": [
180
180
{
@@ -199,7 +199,7 @@ curl -X POST http://localhost:3500/v1.0-alpha2/conversation/openai/converse \
0 commit comments