IRPCConversationOperations.AddOrUpdateChatTurn
Vault API / standard write session
Adds a chat turn to one of the caller's conversations, or replaces the content of an existing chat turn.
| Service | Conversations MFiles.IRPCConversationOperations |
|---|---|
| gRPC method | /MFiles.IRPCConversationOperations/AddOrUpdateChatTurn |
| HTTP (mf-http-grpc) | POST /grpc/v1/add-or-update-chat-turn |
| Request | AddOrUpdateChatTurnRequest |
| Response | AddOrUpdateChatTurnResponse |
| Book and level | Vault API, standard |
| Kind | write |
| Session | Required: the session ID from LogIn in the mfiles-session-id-bin metadata. |
| Idempotent | no |
| Returns metadata structure version | no |
| Streaming | none (unary) |
Remarks
conv_idmust name an existing conversation; otherwise the call fails with "The parameter is incorrect.".- With
id0, or an ID that does not exist, a new chat turn is added with a new ID andsort_key. With an existing ID,chat_turnreplaces the stored content andmodifiedis updated. - The content is stored as given; the server does not parse it.
Request: AddOrUpdateChatTurnRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
chat_turn | ChatTurn | The chat turn. Set conv_id and chat_turn (the content); set id to replace an existing turn. |
chat_turn.id | uint32 | The ID of the chat turn, assigned by the server. |
chat_turn.conv_id | uint32 | The ID of the conversation the turn belongs to. |
chat_turn.chat_turn | string | The content of the turn as text. The server stores it as given and does not parse it; the format is up to the caller. |
chat_turn.sort_key | uint32 | Orders the turns; newer turns have larger values. Used for paging. |
chat_turn.created | google.protobuf.Timestamp | When the turn was added (UTC). |
chat_turn.modified | google.protobuf.Timestamp | When the turn was added or last replaced (UTC). |
Response: AddOrUpdateChatTurnResponse
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
updated_chat_turn | ChatTurn | The chat turn as stored, with its ID and sort_key. |
updated_chat_turn.id | uint32 | The ID of the chat turn, assigned by the server. |
updated_chat_turn.conv_id | uint32 | The ID of the conversation the turn belongs to. |
updated_chat_turn.chat_turn | string | The content of the turn as text. The server stores it as given and does not parse it; the format is up to the caller. |
updated_chat_turn.sort_key | uint32 | Orders the turns; newer turns have larger values. Used for paging. |
updated_chat_turn.created | google.protobuf.Timestamp | When the turn was added (UTC). |
updated_chat_turn.modified | google.protobuf.Timestamp | When the turn was added or last replaced (UTC). |