-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcontext.go
More file actions
132 lines (114 loc) · 3.23 KB
/
Copy pathcontext.go
File metadata and controls
132 lines (114 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// Code generated by Fern. DO NOT EDIT.
package zep
import (
json "encoding/json"
fmt "fmt"
internal "github.com/getzep/zep-go/v3/internal"
)
type CreateContextTemplateRequest struct {
// The template content (max 1200 characters).
Template string `json:"template" url:"-"`
// Unique identifier for the template (max 100 characters).
TemplateID string `json:"template_id" url:"-"`
}
type ContextTemplateResponse struct {
// The template content.
Template *string `json:"template,omitempty" url:"template,omitempty"`
// Unique identifier for the template (max 100 characters).
TemplateID *string `json:"template_id,omitempty" url:"template_id,omitempty"`
// Unique identifier for the template.
UUID *string `json:"uuid,omitempty" url:"uuid,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (c *ContextTemplateResponse) GetTemplate() *string {
if c == nil {
return nil
}
return c.Template
}
func (c *ContextTemplateResponse) GetTemplateID() *string {
if c == nil {
return nil
}
return c.TemplateID
}
func (c *ContextTemplateResponse) GetUUID() *string {
if c == nil {
return nil
}
return c.UUID
}
func (c *ContextTemplateResponse) GetExtraProperties() map[string]interface{} {
return c.extraProperties
}
func (c *ContextTemplateResponse) UnmarshalJSON(data []byte) error {
type unmarshaler ContextTemplateResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*c = ContextTemplateResponse(value)
extraProperties, err := internal.ExtractExtraProperties(data, *c)
if err != nil {
return err
}
c.extraProperties = extraProperties
c.rawJSON = json.RawMessage(data)
return nil
}
func (c *ContextTemplateResponse) String() string {
if len(c.rawJSON) > 0 {
if value, err := internal.StringifyJSON(c.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(c); err == nil {
return value
}
return fmt.Sprintf("%#v", c)
}
type ListContextTemplatesResponse struct {
Templates []*ContextTemplateResponse `json:"templates,omitempty" url:"templates,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (l *ListContextTemplatesResponse) GetTemplates() []*ContextTemplateResponse {
if l == nil {
return nil
}
return l.Templates
}
func (l *ListContextTemplatesResponse) GetExtraProperties() map[string]interface{} {
return l.extraProperties
}
func (l *ListContextTemplatesResponse) UnmarshalJSON(data []byte) error {
type unmarshaler ListContextTemplatesResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*l = ListContextTemplatesResponse(value)
extraProperties, err := internal.ExtractExtraProperties(data, *l)
if err != nil {
return err
}
l.extraProperties = extraProperties
l.rawJSON = json.RawMessage(data)
return nil
}
func (l *ListContextTemplatesResponse) String() string {
if len(l.rawJSON) > 0 {
if value, err := internal.StringifyJSON(l.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(l); err == nil {
return value
}
return fmt.Sprintf("%#v", l)
}
type UpdateContextTemplateRequest struct {
// The template content (max 1200 characters).
Template string `json:"template" url:"-"`
}