Documentation
¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func Byte(b byte) *byte
- func Complex64(c complex64) *complex64
- func Complex128(c complex128) *complex128
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int8(i int8) *int8
- func Int16(i int16) *int16
- func Int32(i int32) *int32
- func Int64(i int64) *int64
- func MustParseDate(date string) time.Time
- func MustParseDateTime(datetime string) time.Time
- func Rune(r rune) *rune
- func String(s string) *string
- func Time(t time.Time) *time.Time
- func UUID(u uuid.UUID) *uuid.UUID
- func Uint(u uint) *uint
- func Uint8(u uint8) *uint8
- func Uint16(u uint16) *uint16
- func Uint32(u uint32) *uint32
- func Uint64(u uint64) *uint64
- func Uintptr(u uintptr) *uintptr
- type APIError
- type BadRequestError
- type ClassifySessionRequest
- type ClassifySessionResponse
- type CollectionCreateIndexRequest
- type CreateDocumentCollectionRequest
- type CreateDocumentRequest
- type CreateSessionRequest
- type CreateUserRequest
- type DocumentCollectionResponse
- type DocumentResponse
- type DocumentSearchPayload
- type DocumentSearchResult
- type DocumentSearchResultPage
- type GetDocumentListRequest
- type InternalServerError
- type Memory
- type MemoryGetRequest
- type MemoryGetRequestMemoryType
- type MemorySearchPayload
- type MemorySearchResult
- type MemorySynthesizeQuestionRequest
- type Message
- type ModelsRoleType
- type NotFoundError
- type Question
- type SearchScope
- type SearchType
- type Session
- type SessionListRequest
- type Summary
- type SummaryListResponse
- type UnauthorizedError
- type UpdateDocumentCollectionRequest
- type UpdateDocumentListRequest
- type UpdateDocumentRequest
- type UpdateSessionRequest
- type UpdateUserRequest
- type User
- type UserListOrderedRequest
- type UserListRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var Environments = struct { Default string }{ Default: "https://api.getzep.com/api/v2", }
Environments defines all of the API environments. These values can be used with the WithBaseURL RequestOption to override the client's default environment, if any.
Functions ¶
func Complex128 ¶
func Complex128(c complex128) *complex128
Complex128 returns a pointer to the given complex128 value.
func MustParseDate ¶
MustParseDate attempts to parse the given string as a date time.Time, and panics upon failure.
func MustParseDateTime ¶
MustParseDateTime attempts to parse the given string as a datetime time.Time, and panics upon failure.
Types ¶
type APIError ¶
type APIError struct {
Message *string `json:"message,omitempty" url:"message,omitempty"`
// contains filtered or unexported fields
}
func (*APIError) UnmarshalJSON ¶
type BadRequestError ¶
func (*BadRequestError) MarshalJSON ¶
func (b *BadRequestError) MarshalJSON() ([]byte, error)
func (*BadRequestError) UnmarshalJSON ¶
func (b *BadRequestError) UnmarshalJSON(data []byte) error
func (*BadRequestError) Unwrap ¶
func (b *BadRequestError) Unwrap() error
type ClassifySessionRequest ¶
type ClassifySessionRequest struct {
Classes []string `json:"classes,omitempty" url:"classes,omitempty"`
Instruction *string `json:"instruction,omitempty" url:"instruction,omitempty"`
LastN *int `json:"last_n,omitempty" url:"last_n,omitempty"`
Name string `json:"name" url:"name"`
Persist *bool `json:"persist,omitempty" url:"persist,omitempty"`
}
type ClassifySessionResponse ¶
type ClassifySessionResponse struct {
Class *string `json:"class,omitempty" url:"class,omitempty"`
Name *string `json:"name,omitempty" url:"name,omitempty"`
// contains filtered or unexported fields
}
func (*ClassifySessionResponse) String ¶
func (c *ClassifySessionResponse) String() string
func (*ClassifySessionResponse) UnmarshalJSON ¶
func (c *ClassifySessionResponse) UnmarshalJSON(data []byte) error
type CollectionCreateIndexRequest ¶
type CollectionCreateIndexRequest struct {
// Force index creation, even if there are too few documents to index
Force *bool `json:"-" url:"force,omitempty"`
}
type CreateDocumentCollectionRequest ¶
type CreateDocumentCollectionRequest struct {
Description *string `json:"description,omitempty" url:"description,omitempty"`
EmbeddingDimensions int `json:"embedding_dimensions" url:"embedding_dimensions"`
// these needs to be pointers so that we can distinguish between false and unset when validating
IsAutoEmbedded bool `json:"is_auto_embedded" url:"is_auto_embedded"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
Name string `json:"name" url:"name"`
}
type CreateDocumentRequest ¶
type CreateDocumentRequest struct {
Content *string `json:"content,omitempty" url:"content,omitempty"`
DocumentID *string `json:"document_id,omitempty" url:"document_id,omitempty"`
Embedding []float64 `json:"embedding,omitempty" url:"embedding,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
// contains filtered or unexported fields
}
func (*CreateDocumentRequest) String ¶
func (c *CreateDocumentRequest) String() string
func (*CreateDocumentRequest) UnmarshalJSON ¶
func (c *CreateDocumentRequest) UnmarshalJSON(data []byte) error
type CreateSessionRequest ¶
type CreateSessionRequest struct {
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
SessionID *string `json:"session_id,omitempty" url:"session_id,omitempty"`
// Must be a pointer to allow for null values
UserID *string `json:"user_id,omitempty" url:"user_id,omitempty"`
}
type CreateUserRequest ¶
type CreateUserRequest struct {
Email *string `json:"email,omitempty" url:"email,omitempty"`
FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"`
LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
UserID *string `json:"user_id,omitempty" url:"user_id,omitempty"`
}
type DocumentCollectionResponse ¶
type DocumentCollectionResponse struct {
CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
Description *string `json:"description,omitempty" url:"description,omitempty"`
// Number of documents in the collection
DocumentCount *int `json:"document_count,omitempty" url:"document_count,omitempty"`
// Number of documents with embeddings
DocumentEmbeddedCount *int `json:"document_embedded_count,omitempty" url:"document_embedded_count,omitempty"`
EmbeddingDimensions *int `json:"embedding_dimensions,omitempty" url:"embedding_dimensions,omitempty"`
EmbeddingModelName *string `json:"embedding_model_name,omitempty" url:"embedding_model_name,omitempty"`
IsAutoEmbedded *bool `json:"is_auto_embedded,omitempty" url:"is_auto_embedded,omitempty"`
IsIndexed *bool `json:"is_indexed,omitempty" url:"is_indexed,omitempty"`
IsNormalized *bool `json:"is_normalized,omitempty" url:"is_normalized,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
Name *string `json:"name,omitempty" url:"name,omitempty"`
UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
UUID *string `json:"uuid,omitempty" url:"uuid,omitempty"`
// contains filtered or unexported fields
}
func (*DocumentCollectionResponse) String ¶
func (d *DocumentCollectionResponse) String() string
func (*DocumentCollectionResponse) UnmarshalJSON ¶
func (d *DocumentCollectionResponse) UnmarshalJSON(data []byte) error
type DocumentResponse ¶
type DocumentResponse struct {
Content *string `json:"content,omitempty" url:"content,omitempty"`
CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
DocumentID *string `json:"document_id,omitempty" url:"document_id,omitempty"`
Embedding []float64 `json:"embedding,omitempty" url:"embedding,omitempty"`
IsEmbedded *bool `json:"is_embedded,omitempty" url:"is_embedded,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
UUID *string `json:"uuid,omitempty" url:"uuid,omitempty"`
// contains filtered or unexported fields
}
func (*DocumentResponse) String ¶
func (d *DocumentResponse) String() string
func (*DocumentResponse) UnmarshalJSON ¶
func (d *DocumentResponse) UnmarshalJSON(data []byte) error
type DocumentSearchPayload ¶
type DocumentSearchPayload struct {
// Limit the number of returned documents
Limit *int `json:"-" url:"limit,omitempty"`
CollectionName *string `json:"collection_name,omitempty" url:"collection_name,omitempty"`
Embedding []float64 `json:"embedding,omitempty" url:"embedding,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
// TODO: implement for documents
MinScore *float64 `json:"min_score,omitempty" url:"min_score,omitempty"`
MmrLambda *float64 `json:"mmr_lambda,omitempty" url:"mmr_lambda,omitempty"`
SearchType *SearchType `json:"search_type,omitempty" url:"search_type,omitempty"`
Text *string `json:"text,omitempty" url:"text,omitempty"`
}
type DocumentSearchResult ¶
type DocumentSearchResult struct {
Content *string `json:"content,omitempty" url:"content,omitempty"`
CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
DocumentID *string `json:"document_id,omitempty" url:"document_id,omitempty"`
Embedding []float64 `json:"embedding,omitempty" url:"embedding,omitempty"`
IsEmbedded *bool `json:"is_embedded,omitempty" url:"is_embedded,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
Score *float64 `json:"score,omitempty" url:"score,omitempty"`
UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
UUID *string `json:"uuid,omitempty" url:"uuid,omitempty"`
// contains filtered or unexported fields
}
func (*DocumentSearchResult) String ¶
func (d *DocumentSearchResult) String() string
func (*DocumentSearchResult) UnmarshalJSON ¶
func (d *DocumentSearchResult) UnmarshalJSON(data []byte) error
type DocumentSearchResultPage ¶
type DocumentSearchResultPage struct {
CurrentPage *int `json:"current_page,omitempty" url:"current_page,omitempty"`
QueryVector []float64 `json:"query_vector,omitempty" url:"query_vector,omitempty"`
ResultCount *int `json:"result_count,omitempty" url:"result_count,omitempty"`
Results []*DocumentSearchResult `json:"results,omitempty" url:"results,omitempty"`
TotalPages *int `json:"total_pages,omitempty" url:"total_pages,omitempty"`
// contains filtered or unexported fields
}
func (*DocumentSearchResultPage) String ¶
func (d *DocumentSearchResultPage) String() string
func (*DocumentSearchResultPage) UnmarshalJSON ¶
func (d *DocumentSearchResultPage) UnmarshalJSON(data []byte) error
type GetDocumentListRequest ¶
type InternalServerError ¶
func (*InternalServerError) MarshalJSON ¶
func (i *InternalServerError) MarshalJSON() ([]byte, error)
func (*InternalServerError) UnmarshalJSON ¶
func (i *InternalServerError) UnmarshalJSON(data []byte) error
func (*InternalServerError) Unwrap ¶
func (i *InternalServerError) Unwrap() error
type Memory ¶
type Memory struct {
Facts []string `json:"facts,omitempty" url:"facts,omitempty"`
Messages []*Message `json:"messages,omitempty" url:"messages,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
Summary *Summary `json:"summary,omitempty" url:"summary,omitempty"`
// contains filtered or unexported fields
}
func (*Memory) UnmarshalJSON ¶
type MemoryGetRequest ¶
type MemoryGetRequest struct {
// memoryType: perpetual or message_window
MemoryType *MemoryGetRequestMemoryType `json:"-" url:"memoryType,omitempty"`
// Last N messages. Overrides memory_window configuration
Lastn *int `json:"-" url:"lastn,omitempty"`
}
type MemoryGetRequestMemoryType ¶ added in v0.0.2
type MemoryGetRequestMemoryType string
const ( MemoryGetRequestMemoryTypePerpetual MemoryGetRequestMemoryType = "perpetual" MemoryGetRequestMemoryTypeSummaryRetriever MemoryGetRequestMemoryType = "summary_retriever" MemoryGetRequestMemoryTypeMessageWindow MemoryGetRequestMemoryType = "message_window" )
func NewMemoryGetRequestMemoryTypeFromString ¶ added in v0.0.2
func NewMemoryGetRequestMemoryTypeFromString(s string) (MemoryGetRequestMemoryType, error)
func (MemoryGetRequestMemoryType) Ptr ¶ added in v0.0.2
func (m MemoryGetRequestMemoryType) Ptr() *MemoryGetRequestMemoryType
type MemorySearchPayload ¶
type MemorySearchPayload struct {
// Limit the number of results returned
Limit *int `json:"-" url:"limit,omitempty"`
Embedding []float64 `json:"embedding,omitempty" url:"embedding,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
MinScore *float64 `json:"min_score,omitempty" url:"min_score,omitempty"`
MmrLambda *float64 `json:"mmr_lambda,omitempty" url:"mmr_lambda,omitempty"`
SearchScope *SearchScope `json:"search_scope,omitempty" url:"search_scope,omitempty"`
SearchType *SearchType `json:"search_type,omitempty" url:"search_type,omitempty"`
Text *string `json:"text,omitempty" url:"text,omitempty"`
}
type MemorySearchResult ¶
type MemorySearchResult struct {
Embedding []float64 `json:"embedding,omitempty" url:"embedding,omitempty"`
Message *Message `json:"message,omitempty" url:"message,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
Score *float64 `json:"score,omitempty" url:"score,omitempty"`
Summary *Summary `json:"summary,omitempty" url:"summary,omitempty"`
// contains filtered or unexported fields
}
func (*MemorySearchResult) String ¶
func (m *MemorySearchResult) String() string
func (*MemorySearchResult) UnmarshalJSON ¶
func (m *MemorySearchResult) UnmarshalJSON(data []byte) error
type MemorySynthesizeQuestionRequest ¶
type MemorySynthesizeQuestionRequest struct {
// Last N messages
LastNMessages *int `json:"-" url:"lastNMessages,omitempty"`
}
type Message ¶
type Message struct {
Content *string `json:"content,omitempty" url:"content,omitempty"`
CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
Role *string `json:"role,omitempty" url:"role,omitempty"`
RoleType *ModelsRoleType `json:"role_type,omitempty" url:"role_type,omitempty"`
TokenCount *int `json:"token_count,omitempty" url:"token_count,omitempty"`
UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
UUID *string `json:"uuid,omitempty" url:"uuid,omitempty"`
// contains filtered or unexported fields
}
func (*Message) UnmarshalJSON ¶
type ModelsRoleType ¶ added in v0.0.2
type ModelsRoleType string
const ( ModelsRoleTypeNoRole ModelsRoleType = "norole" ModelsRoleTypeSystemRole ModelsRoleType = "system" ModelsRoleTypeAssistantRole ModelsRoleType = "assistant" ModelsRoleTypeUserRole ModelsRoleType = "user" ModelsRoleTypeFunctionRole ModelsRoleType = "function" ModelsRoleTypeToolRole ModelsRoleType = "tool" )
func NewModelsRoleTypeFromString ¶ added in v0.0.2
func NewModelsRoleTypeFromString(s string) (ModelsRoleType, error)
func (ModelsRoleType) Ptr ¶ added in v0.0.2
func (m ModelsRoleType) Ptr() *ModelsRoleType
type NotFoundError ¶
func (*NotFoundError) MarshalJSON ¶
func (n *NotFoundError) MarshalJSON() ([]byte, error)
func (*NotFoundError) UnmarshalJSON ¶
func (n *NotFoundError) UnmarshalJSON(data []byte) error
func (*NotFoundError) Unwrap ¶
func (n *NotFoundError) Unwrap() error
type Question ¶
type Question struct {
Question *string `json:"question,omitempty" url:"question,omitempty"`
// contains filtered or unexported fields
}
func (*Question) UnmarshalJSON ¶
type SearchScope ¶
type SearchScope string
const ( SearchScopeMessages SearchScope = "messages" SearchScopeSummary SearchScope = "summary" )
func NewSearchScopeFromString ¶
func NewSearchScopeFromString(s string) (SearchScope, error)
func (SearchScope) Ptr ¶
func (s SearchScope) Ptr() *SearchScope
type SearchType ¶
type SearchType string
const ( SearchTypeSimilarity SearchType = "similarity" SearchTypeMmr SearchType = "mmr" )
func NewSearchTypeFromString ¶
func NewSearchTypeFromString(s string) (SearchType, error)
func (SearchType) Ptr ¶
func (s SearchType) Ptr() *SearchType
type Session ¶
type Session struct {
Classifications map[string]string `json:"classifications,omitempty" url:"classifications,omitempty"`
CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
DeletedAt *string `json:"deleted_at,omitempty" url:"deleted_at,omitempty"`
Facts []string `json:"facts,omitempty" url:"facts,omitempty"`
ID *int `json:"id,omitempty" url:"id,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
ProjectUUID *string `json:"project_uuid,omitempty" url:"project_uuid,omitempty"`
SessionID *string `json:"session_id,omitempty" url:"session_id,omitempty"`
UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
// Must be a pointer to allow for null values
UserID *string `json:"user_id,omitempty" url:"user_id,omitempty"`
UUID *string `json:"uuid,omitempty" url:"uuid,omitempty"`
// contains filtered or unexported fields
}
func (*Session) UnmarshalJSON ¶
type SessionListRequest ¶
type Summary ¶
type Summary struct {
Content *string `json:"content,omitempty" url:"content,omitempty"`
CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
RelatedMessageUUIDs []string `json:"related_message_uuids,omitempty" url:"related_message_uuids,omitempty"`
TokenCount *int `json:"token_count,omitempty" url:"token_count,omitempty"`
UUID *string `json:"uuid,omitempty" url:"uuid,omitempty"`
// contains filtered or unexported fields
}
func (*Summary) UnmarshalJSON ¶
type SummaryListResponse ¶
type SummaryListResponse struct {
RowCount *int `json:"row_count,omitempty" url:"row_count,omitempty"`
Summaries []*Summary `json:"summaries,omitempty" url:"summaries,omitempty"`
TotalCount *int `json:"total_count,omitempty" url:"total_count,omitempty"`
// contains filtered or unexported fields
}
func (*SummaryListResponse) String ¶
func (s *SummaryListResponse) String() string
func (*SummaryListResponse) UnmarshalJSON ¶
func (s *SummaryListResponse) UnmarshalJSON(data []byte) error
type UnauthorizedError ¶
type UnauthorizedError struct {
}
func (*UnauthorizedError) MarshalJSON ¶
func (u *UnauthorizedError) MarshalJSON() ([]byte, error)
func (*UnauthorizedError) UnmarshalJSON ¶
func (u *UnauthorizedError) UnmarshalJSON(data []byte) error
func (*UnauthorizedError) Unwrap ¶
func (u *UnauthorizedError) Unwrap() error
type UpdateDocumentListRequest ¶
type UpdateDocumentListRequest struct {
DocumentID *string `json:"document_id,omitempty" url:"document_id,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
UUID string `json:"uuid" url:"uuid"`
// contains filtered or unexported fields
}
func (*UpdateDocumentListRequest) String ¶
func (u *UpdateDocumentListRequest) String() string
func (*UpdateDocumentListRequest) UnmarshalJSON ¶
func (u *UpdateDocumentListRequest) UnmarshalJSON(data []byte) error
type UpdateDocumentRequest ¶
type UpdateSessionRequest ¶
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Email *string `json:"email,omitempty" url:"email,omitempty"`
FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"`
LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
UserID *string `json:"user_id,omitempty" url:"user_id,omitempty"`
UUID *string `json:"uuid,omitempty" url:"uuid,omitempty"`
}
type User ¶
type User struct {
CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
DeletedAt *string `json:"deleted_at,omitempty" url:"deleted_at,omitempty"`
Email *string `json:"email,omitempty" url:"email,omitempty"`
FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"`
ID *int `json:"id,omitempty" url:"id,omitempty"`
LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
ProjectUUID *string `json:"project_uuid,omitempty" url:"project_uuid,omitempty"`
SessionCount *int `json:"session_count,omitempty" url:"session_count,omitempty"`
UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
UserID *string `json:"user_id,omitempty" url:"user_id,omitempty"`
UUID *string `json:"uuid,omitempty" url:"uuid,omitempty"`
// contains filtered or unexported fields
}
func (*User) UnmarshalJSON ¶
type UserListOrderedRequest ¶
type UserListRequest ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.