Skip to content

Commit 138c355

Browse files
authored
Merge pull request #662 from watson-developer-cloud/5.0.0.rc1
5.0.0.rc
2 parents b28567e + aa3368f commit 138c355

File tree

194 files changed

+6525
-2936
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+6525
-2936
lines changed

Examples/ExampleNaturalLanguageClassifierV1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019, 2020.
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.

Examples/ExampleNaturalLanguageUnderstandingV1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019, 2020.
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.

Examples/ExamplePersonalityInsightsV3.cs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
using System.Collections.Generic;
2727
using System.IO;
2828
using UnityEngine;
29+
using System.Text;
2930

3031
namespace IBM.Watson.Examples
3132
{
@@ -62,18 +63,8 @@ private IEnumerator CreateService()
6263

6364
private IEnumerator Examples()
6465
{
65-
Content content = new Content()
66-
{
67-
ContentItems = new List<ContentItem>()
68-
{
69-
new ContentItem()
70-
{
71-
Content = testString,
72-
Contenttype = ContentItem.ContenttypeValue.TEXT_PLAIN,
73-
Language = ContentItem.LanguageValue.EN
74-
}
75-
}
76-
};
66+
byte[] bytes = Encoding.ASCII.GetBytes(testString);
67+
MemoryStream content = new MemoryStream(bytes);
7768

7869
Log.Debug("ExamplePersonalityInsights.Examples()", "Attempting to Profile...");
7970
service.Profile(OnProfile, content: content);

Examples/ExampleToneAnalyzerV3.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019, 2020.
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.
@@ -24,6 +24,8 @@
2424
using IBM.Cloud.SDK;
2525
using IBM.Cloud.SDK.Authentication;
2626
using IBM.Cloud.SDK.Authentication.Iam;
27+
using System.Text;
28+
using System.IO;
2729

2830
namespace IBM.Watson.Examples
2931
{
@@ -79,10 +81,8 @@ private IEnumerator CreateService()
7981

8082
private IEnumerator Examples()
8183
{
82-
ToneInput toneInput = new ToneInput()
83-
{
84-
Text = stringToTestTone
85-
};
84+
byte[] bytes = Encoding.ASCII.GetBytes(stringToTestTone);
85+
MemoryStream toneInput = new MemoryStream(bytes);
8686

8787
List<string> tones = new List<string>()
8888
{

Examples/GenericSerialization.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ void Start()
3434

3535
MessageResponse messageResponse = JsonConvert.DeserializeObject<MessageResponse>(responseJson);
3636

37-
var name = messageResponse.Context.Skills.Get("main skill").UserDefined["name"].ToString();
37+
MessageContextSkill mainSkill;
38+
messageResponse.Context.Skills.TryGetValue("main skill", out mainSkill);
39+
var name = mainSkill.UserDefined["name"].ToString();
3840
Log.Debug("GenericSerialization", "name: {0}", name);
3941

4042
}

MIGRATION-V5.md

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
## Unity SDK V5 Migration guide
2+
3+
### Service changes
4+
5+
#### All Services
6+
* `VersionDate` was renamed to `Version`
7+
8+
#### Assistant v1
9+
10+
* `includeCount` is now a parameter of the `ListWorkspaces()` method
11+
* `includeCount` is now a parameter of the `ListIntents()` method
12+
* `includeCount` is now a parameter of the `ListExamples()` method
13+
* `includeCount` is now a parameter of the `ListCounterexamples()` method
14+
* `includeCount` is now a parameter of the `ListEntities()` method
15+
* `includeCount` is now a parameter of the `ListValues()` method
16+
* `includeCount` is now a parameter of the `ListSynonyms()` method
17+
* `includeCount` is now a parameter of the `ListDialogNodes()` method
18+
* `context` type was changed from `Dictionary<string, object>` to `DialogNodeContext` in the `CreateDialogNode()` method
19+
* `newContext` type was changed from `Dictionary<string, object>` to `DialogNodeContext` in the `UpdateDialogNode()` method
20+
* `BulkClassify()` method was addded
21+
22+
##### Models Added
23+
24+
`BulkClassifyOutput`,
25+
`BulkClassifyResponse`,
26+
`BulkClassifyUtterance`,
27+
`DialogNodeContext`,
28+
`DialogNodeOutputConnectToAgentTransferInfo`,
29+
`DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent`,
30+
`DialogNodeOutputGenericDialogNodeOutputResponseTypeImage`,
31+
`DialogNodeOutputGenericDialogNodeOutputResponseTypeOption`,
32+
`DialogNodeOutputGenericDialogNodeOutputResponseTypePause`,
33+
`DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill`,
34+
`DialogNodeOutputGenericDialogNodeOutputResponseTypeText`,
35+
`RuntimeResponseGenericRuntimeResponseTypeConnectToAgent`,
36+
`RuntimeResponseGenericRuntimeResponseTypeImage`,
37+
`RuntimeResponseGenericRuntimeResponseTypeOption`,
38+
`RuntimeResponseGenericRuntimeResponseTypePause`,
39+
`RuntimeResponseGenericRuntimeResponseTypeSuggestion`,
40+
`RuntimeResponseGenericRuntimeResponseTypeText`
41+
42+
##### Models Removed
43+
44+
`DialogSuggestionOutput`,
45+
`DialogSuggestionResponseGeneric`,
46+
`SystemResponse`
47+
48+
##### Model Properties Changed
49+
50+
`Context`
51+
* `System` property type changed from `SystemResponse` to `Dictionary<string, object>`
52+
53+
`DialogNode`
54+
* `context` property type changed from `Dictionary<string, object>` to `DialogNodeContext`
55+
56+
`DialogNodeOutput`
57+
* Added `Integrations` property with getter and setter
58+
59+
`DialogNodeOutputGeneric`, `RuntimeResponseGeneric`
60+
* Added `AgentAvailable`, `AgentUnavailable`, and `TransferInfo` properties
61+
62+
`DialogSuggestion`
63+
* `output` property type changed from `DialogSuggestionOutput` to `Dictionary<string, object>`
64+
65+
#### Assistant v2
66+
67+
* `BulkClassify()` method was addded
68+
69+
##### Models Added
70+
71+
`BulkClassifyOutput`,
72+
`BulkClassifyResponse`,
73+
`BulkClassifyUtterance`,
74+
`DialogNodeOutputConnectToAgentTransferInfo`,
75+
`RuntimeResponseGenericRuntimeResponseTypeConnectToAgent`,
76+
`RuntimeResponseGenericRuntimeResponseTypeImage`,
77+
`RuntimeResponseGenericRuntimeResponseTypeOption`,
78+
`RuntimeResponseGenericRuntimeResponseTypePause`,
79+
`RuntimeResponseGenericRuntimeResponseTypeSearch`,
80+
`RuntimeResponseGenericRuntimeResponseTypeSuggestion`,
81+
`RuntimeResponseGenericRuntimeResponseTypeText`
82+
83+
##### Models Removed
84+
85+
`MessageContextSkills`
86+
87+
##### Model Properties Changed
88+
89+
`MessageContext`, `MessageContextStateless`
90+
* `Skills` property type changed from `MessageContextSkills` to `Dictionary<string, MessageContextSkill>`
91+
92+
`MessageContextSkill`
93+
* `System` property type changed from `Dictionary<string, object>` to `MessageContextSkillSystem`
94+
95+
`RuntimeResponseGeneric`
96+
* Added `AgentAvailable`, `AgentUnavailable`, and `TransferInfo` properties
97+
98+
#### Compare Comply v1
99+
100+
* `before` and `after` parameters were removed from `ListFeedback` method
101+
102+
##### Model Properties Changed
103+
104+
`Category`, `TypeLabel`
105+
* Added `ModificationEnumValue` class
106+
* Added `Modification` property
107+
108+
`OriginalLabelsOut`, `UpdatedLabelsOut`
109+
* Removed `ModificationEnumValue` class
110+
* Removed `Modification` property
111+
112+
#### Discovery v1
113+
114+
##### Models Removed
115+
116+
`NluEnrichmentCategories`
117+
118+
##### Model Properties Changed
119+
120+
`NluEnrichmentFeatures`
121+
* Changed `Categories` property type from `NluEnrichmentCategories` to `Dictionary<string, object>`
122+
123+
#### Discovery v2
124+
125+
* `AnalyzeDocument()` method was addded
126+
127+
##### Models Added
128+
129+
`AnalyzedDocument`,
130+
`AnalyzedResult`,
131+
`QueryResponsePassage`
132+
133+
##### Models Removed
134+
135+
`QueryNoticesResult`
136+
137+
##### Model Properties Changed
138+
139+
`QueryGroupByAggregation`
140+
* Inherits `QueryAggregation`
141+
142+
`QueryResponse`
143+
* Added `Passages` property
144+
145+
#### Language Translator v3
146+
147+
No changes
148+
149+
#### Natural Language Classifier v1
150+
151+
No changes
152+
153+
#### Natural Language Understanding v1
154+
155+
##### Models Added
156+
157+
`FeaturesResultsMetadata`
158+
159+
##### Models Removed
160+
161+
`AnalysisResultsMetadata`,
162+
`MetadataOptions`
163+
164+
##### Model Properties Changed
165+
166+
`AnalysisResults`
167+
* Changed `Metadata` property type from `AnalysisResultsMetadata` to `FeaturesResultsMetadata`
168+
169+
`Features`
170+
* Changed `Metadata` property type from `MetadataOptions` to `object`
171+
172+
#### Personality Insights
173+
174+
* Added deprecation notice
175+
* Changed `content` parameter type from `Content` to `System.IO.MemoryStream` in `Profile()` method
176+
* Changed `content` parameter type from `Content` to `System.IO.MemoryStream` in `ProfileAsCsv()` method
177+
178+
##### Models Removed
179+
180+
`Content`,
181+
`ContentItem`
182+
183+
#### Speech To Text v1
184+
185+
* Changed `audio` parameter type from `byte[]` to `System.IO.MemoryStream` in `Recognize()` method
186+
187+
* Changed `audio` parameter type from `byte[]` to `System.IO.MemoryStream` in `CreateJob()` method
188+
189+
* Changed `grammarFile` parameter type from `string` to `System.IO.MemoryStream` in `AddGrammar()` method
190+
191+
* Changed `audioResource` parameter type from `byte[]` to `System.IO.MemoryStream` in `AddAudio()` method
192+
193+
#### Text To Speech v1
194+
195+
* Renamed `CreateVoiceModel()` method to `CreateCustomModel()`
196+
197+
* Renamed `ListVoiceModels()` method to `ListCustomModels()`
198+
199+
* Renamed `UpdateVoiceModel()` method to `UpdateCustomModel()`
200+
201+
* Renamed `GetVoiceModel()` method to `GetCustomModel()`
202+
203+
* Renamed `DeleteVoiceModel()` method to `GetCustomModel()`
204+
205+
##### Models Added
206+
207+
`CustomModel`,
208+
`CustomModels`
209+
210+
##### Models Removed
211+
212+
`VoiceModel`,
213+
`VoiceModels`
214+
215+
##### Model Properties Changed
216+
217+
`Voice`
218+
* Change return type of `Customization` from `VoiceModel` to `CustomModel`
219+
220+
#### Tone Analyzer v3
221+
222+
* Changed `toneInput` parameter type from `ToneInput` to `System.IO.MemoryStream` in `Tone()` method
223+
224+
#### Visual Recognition v3
225+
226+
* Added deprecation notice
227+
228+
#### Visual Recognition v4
229+
230+
* Added deprecation notice
231+
* Changed `startTime` and `endTime` parameter types from `string` to `DateTime` in `GetTrainingUsage()` method
232+
233+
##### Models Added
234+
235+
`CollectionTrainingStatus`,
236+
`ObjectDetailLocation`
237+
238+
##### Model Properties Changed
239+
240+
`Collection`
241+
* `TrainingStatus` property is no longer virtual
242+
* Changed `TrainingStatus` property type from `TraningStatus` to `CollectionTrainingStatus`
243+
244+
`ObjectDetail`
245+
* Changed `Location` property type from `Location` to `ObjectDetailLocation`

0 commit comments

Comments
 (0)