Skip to content

Commit 4bb90ac

Browse files
committed
feat(assistant-v2): session_start_time and state properties added to MessageContextGlobalSystem
1 parent 1743425 commit 4bb90ac

File tree

3 files changed

+56
-9
lines changed

3 files changed

+56
-9
lines changed

Scripts/Services/Assistant/V2/Model/MessageContextGlobalSystem.cs

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2018, 2021.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -136,12 +136,31 @@ public class LocaleValue
136136
/// `tomorrow`. This can be useful for simulating past or future times for testing purposes, or when analyzing
137137
/// documents such as news articles.
138138
///
139-
/// This value must be a UTC time value formatted according to ISO 8601 (for example, `2019-06-26T12:00:00Z` for
140-
/// noon on 26 June 2019.
139+
/// This value must be a UTC time value formatted according to ISO 8601 (for example, `2021-06-26T12:00:00Z` for
140+
/// noon UTC on 26 June 2021).
141141
///
142142
/// This property is included only if the new system entities are enabled for the skill.
143143
/// </summary>
144144
[JsonProperty("reference_time", NullValueHandling = NullValueHandling.Ignore)]
145145
public string ReferenceTime { get; set; }
146+
/// <summary>
147+
/// The time at which the session started. With the stateful `message` method, the start time is always present,
148+
/// and is set by the service based on the time the session was created. With the stateless `message` method,
149+
/// the start time is set by the service in the response to the first message, and should be returned as part of
150+
/// the context with each subsequent message in the session.
151+
///
152+
/// This value is a UTC time value formatted according to ISO 8601 (for example, `2021-06-26T12:00:00Z` for noon
153+
/// UTC on 26 June 2021).
154+
/// </summary>
155+
[JsonProperty("session_start_time", NullValueHandling = NullValueHandling.Ignore)]
156+
public string SessionStartTime { get; set; }
157+
/// <summary>
158+
/// An encoded string that represents the configuration state of the assistant at the beginning of the
159+
/// conversation. If you are using the stateless `message` method, save this value and then send it in the
160+
/// context of the subsequent message request to avoid disruptions if there are configuration changes during the
161+
/// conversation (such as a change to a skill the assistant uses).
162+
/// </summary>
163+
[JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)]
164+
public string State { get; set; }
146165
}
147166
}

Scripts/Services/Assistant/V2/Model/MessageInput.cs

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2018, 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,19 +26,33 @@ namespace IBM.Watson.Assistant.V2.Model
2626
public class MessageInput
2727
{
2828
/// <summary>
29-
/// The type of user input. Currently, only text input is supported.
29+
/// The type of the message:
30+
///
31+
/// - `text`: The user input is processed normally by the assistant.
32+
/// - `search`: Only search results are returned. (Any dialog or actions skill is bypassed.)
33+
///
34+
/// **Note:** A `search` message results in an error if no search skill is configured for the assistant.
3035
/// </summary>
3136
public class MessageTypeValue
3237
{
3338
/// <summary>
3439
/// Constant TEXT for text
3540
/// </summary>
3641
public const string TEXT = "text";
42+
/// <summary>
43+
/// Constant SEARCH for search
44+
/// </summary>
45+
public const string SEARCH = "search";
3746

3847
}
3948

4049
/// <summary>
41-
/// The type of user input. Currently, only text input is supported.
50+
/// The type of the message:
51+
///
52+
/// - `text`: The user input is processed normally by the assistant.
53+
/// - `search`: Only search results are returned. (Any dialog or actions skill is bypassed.)
54+
///
55+
/// **Note:** A `search` message results in an error if no search skill is configured for the assistant.
4256
/// Constants for possible values can be found using MessageInput.MessageTypeValue
4357
/// </summary>
4458
[JsonProperty("message_type", NullValueHandling = NullValueHandling.Ignore)]

Scripts/Services/Assistant/V2/Model/MessageInputStateless.cs

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2018, 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,19 +26,33 @@ namespace IBM.Watson.Assistant.V2.Model
2626
public class MessageInputStateless
2727
{
2828
/// <summary>
29-
/// The type of user input. Currently, only text input is supported.
29+
/// The type of the message:
30+
///
31+
/// - `text`: The user input is processed normally by the assistant.
32+
/// - `search`: Only search results are returned. (Any dialog or actions skill is bypassed.)
33+
///
34+
/// **Note:** A `search` message results in an error if no search skill is configured for the assistant.
3035
/// </summary>
3136
public class MessageTypeValue
3237
{
3338
/// <summary>
3439
/// Constant TEXT for text
3540
/// </summary>
3641
public const string TEXT = "text";
42+
/// <summary>
43+
/// Constant SEARCH for search
44+
/// </summary>
45+
public const string SEARCH = "search";
3746

3847
}
3948

4049
/// <summary>
41-
/// The type of user input. Currently, only text input is supported.
50+
/// The type of the message:
51+
///
52+
/// - `text`: The user input is processed normally by the assistant.
53+
/// - `search`: Only search results are returned. (Any dialog or actions skill is bypassed.)
54+
///
55+
/// **Note:** A `search` message results in an error if no search skill is configured for the assistant.
4256
/// Constants for possible values can be found using MessageInputStateless.MessageTypeValue
4357
/// </summary>
4458
[JsonProperty("message_type", NullValueHandling = NullValueHandling.Ignore)]

0 commit comments

Comments
 (0)