Documentation
¶
Overview ¶
Package memaura is the official Go SDK for the MemAura memory data plane.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
StatusCode int
Code int
ErrorCode string
Message string
Detail json.RawMessage
}
APIError reports a non-success MemAura API envelope.
type AddInput ¶
type AddInput struct {
Turns []Turn
SessionID string
GroupID string
GroupName string
CommitID string
DeviceNo string
}
AddInput describes a memory-ingestion request.
type Config ¶
type Config struct {
// APIKey authenticates data-plane requests. Keep it on trusted servers only.
APIKey string
// Endpoint overrides the MemAura API endpoint.
Endpoint string
// DeviceNo is sent as X-Device-No unless an operation overrides it.
DeviceNo string
// HTTPClient optionally replaces the default HTTP client.
HTTPClient *http.Client
}
Config configures a Memory client.
type EvidenceDetail ¶
type EvidenceDetail struct {
EventID string
Text string
Source string
Role *string
SenderName *string
AtomicFacts []string
GroupID *string
Timestamp *string
}
EvidenceDetail is one ordered item of retrieval evidence.
type JobOperations ¶
type JobOperations struct {
// contains filtered or unexported fields
}
JobOperations provides status and waiting operations for asynchronous ingestion.
func (*JobOperations) Wait ¶
func (jobs *JobOperations) Wait(ctx context.Context, jobID string, options ...WaitOption) (JobStatus, error)
Wait polls until the job has a terminal status or the context/deadline ends.
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is a configured API-key client for MemAura memory operations.
func (*Memory) Add ¶
Add queues a memory-ingestion request. CommitID makes caller-managed retries idempotent.
func (*Memory) Jobs ¶
func (m *Memory) Jobs() *JobOperations
Jobs returns the job operations associated with this Memory client.
func (*Memory) Search ¶
func (m *Memory) Search(ctx context.Context, input SearchInput) (SearchResult, error)
Search performs regular memory retrieval.
func (*Memory) SearchHybrid ¶
func (m *Memory) SearchHybrid(ctx context.Context, input SearchInput) (SearchResult, error)
SearchHybrid performs explicit hybrid memory retrieval.
type SearchInput ¶
SearchInput describes a regular or hybrid memory retrieval request.
type SearchResult ¶
type SearchResult struct {
Strategy string
Query string
Evidence []string
EvidenceDetails []EvidenceDetail
RequestedGroupID *string
}
SearchResult is the normalized result of a regular or hybrid retrieval.
type TimeoutError ¶
TimeoutError reports that waiting for an ingest job reached its deadline.
func (*TimeoutError) Error ¶
func (e *TimeoutError) Error() string
func (*TimeoutError) Unwrap ¶
func (e *TimeoutError) Unwrap() error
Unwrap allows errors.Is(err, context.DeadlineExceeded).
type Turn ¶
type Turn struct {
Content string
Role Role
TurnID string
Timestamp string
SenderName string
ReferList []string
}
Turn is one message submitted for asynchronous memory ingestion.
type ValidationError ¶
ValidationError reports invalid client-side input before a request is sent.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type WaitOption ¶
type WaitOption interface {
// contains filtered or unexported methods
}
WaitOption configures Jobs().Wait.
func WithPollInterval ¶
func WithPollInterval(interval time.Duration) WaitOption
WithPollInterval sets the delay between job status requests.
func WithWaitTimeout ¶
func WithWaitTimeout(timeout time.Duration) WaitOption
WithWaitTimeout bounds the total time spent waiting for a job.
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
basic
command
|
|
|
internal
|
|
|
generated
Package generated owns regeneration of the internal OpenAPI client.
|
Package generated owns regeneration of the internal OpenAPI client. |
|
generated/ogen
Code generated by ogen, DO NOT EDIT.
|
Code generated by ogen, DO NOT EDIT. |