Skip to content

Commit

Permalink
Audio Summary UI Customization (#106)
Browse files Browse the repository at this point in the history
* Adds new properties for summary ui customization

* * Audio experience ui changes
* Make few fields optional while submitting conversation
* Writes integration tests
  • Loading branch information
subodhjenasymbl authored Oct 27, 2023
1 parent c3bbb46 commit d439819
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 8 deletions.
26 changes: 25 additions & 1 deletion examples/summaryui/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,34 @@ func main() {
fmt.Printf("prettyjson.Marshal failed. Err: %v\n", err)
os.Exit(1)
}

fmt.Printf("\n\n")
fmt.Printf("%s\n", prettyJson)
fmt.Printf("\n\n")

// Define an AudioSummaryRequest object with some example values.
audioSummaryUICustomizationRequest := interfaces.AudioSummaryRequest{
Name: "audio-summary",
AudioURL: "https://symbltestdata.s3.us-east-2.amazonaws.com/newPhonecall.mp3",
Logo: "https://avatars.githubusercontent.com/u/61848556?s=200&v=4",
Favicon: "https://raw.githubusercontent.com/warpspeed/php-slim-sample/master/public/favicon.ico",
Color: interfaces.Color{
Background: "#FFFFFF",
TopicsFilter: "#0000FF",
InsightsFilter: "#FF0000",
},
Font: interfaces.Font{
Family: "Arial",
},
SummaryURLExpiresIn: 3600,
ReadOnly: false,
EnableCustomDomain: false,
}
audioSummaryResult, err := asyncClient.GetAudioSummaryUI(ctx, jobConvo.ConversationID, audioSummaryUICustomizationRequest)
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
fmt.Printf("Audio Summary Result: %+v\n", audioSummaryResult)

fmt.Printf("Succeeded")
}
2 changes: 1 addition & 1 deletion pkg/api/async/v1/async.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0

/*
Async package for processing Async conversations
Async package for processing Async conversations
*/
package async

Expand Down
27 changes: 22 additions & 5 deletions pkg/api/async/v1/interfaces/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ type ChannelMetadata struct {
}

type Features struct {
FeatureList []string `json:"featureList"`
FeatureList []string `json:"featureList,omitempty"`
}

type Metadata struct {
SalesStage string `json:"salesStage"`
ProspectName string `json:"prospectName"`
SalesStage string `json:"salesStage,omitempty"`
ProspectName string `json:"prospectName,omitempty"`
}

// AsyncURLFileRequest for PostURL to post a file to the platform
Expand Down Expand Up @@ -332,8 +332,25 @@ type TextSummaryRequest struct {
}

type AudioSummaryRequest struct {
Name string `json:"name,omitempty"`
AudioURL string `json:"audioUrl,omitempty"`
Name string `json:"name,omitempty"`
AudioURL string `json:"audioUrl,omitempty"`
Logo string `json:"logo,omitempty"`
Favicon string `json:"favicon,omitempty"`
Color Color `json:"color,omitempty"`
Font Font `json:"font,omitempty"`
SummaryURLExpiresIn int `json:"summaryURLExpiresIn,omitempty"`
ReadOnly bool `json:"readOnly,omitempty"`
EnableCustomDomain bool `json:"enableCustomDomain,omitempty"`
}

type Color struct {
Background string `json:"background,omitempty"`
TopicsFilter string `json:"topicsFilter,omitempty"`
InsightsFilter string `json:"insightsFilter,omitempty"`
}

type Font struct {
Family string `json:"family,omitempty"`
}

type VideoSummaryRequest struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/api/async/v1/summaryui.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func (c *Client) GetTextSummaryUI(ctx context.Context, conversationId string, re
c.getQueryParamFromContext(ctx))
klog.V(6).Infof("Calling %s\n", URI)

request.Name = "audio-summary"
jsonStr, err := json.Marshal(request)
if err != nil {
klog.V(1).Infof("json.Marshal failed. Err: %v\n", err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/version/async-version.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const (
SummariesOfBookmarksURI string = "https://api.symbl.ai/%s/conversations/%s/bookmarks-summary"

// summary ui
SummaryURI string = "https://api.symbl.ai/%s/conversations/%s/summary"
SummaryURI string = "https://api.symbl.ai/%s/conversations/%s/experiences"

// Insights Ui
InsightsListUiURI string = "https://api.symbl.ai/%s/conversations/experiences/insights/list?includeCallScore=true"
Expand Down

0 comments on commit d439819

Please sign in to comment.