Documentation
¶
Index ¶
- func CreateComponents(cfg *config.Config, logger logx.Logger) (contextstore.ContextStore, summarizer.Summarizer, vector.Embedder, error)
- func GenerateHash(summary string, timestamp int64) string
- func SaveConfig(config *Config, path string) ([]byte, error)
- type Config
- type Server
- func (s *Server) GetEmbedder() vector.Embedder
- func (s *Server) GetLogger() logx.Logger
- func (s *Server) GetStore() contextstore.ContextStore
- func (s *Server) GetSummarizer() summarizer.Summarizer
- func (s *Server) RetrieveContext(query string, limit int) ([]string, error)
- func (s *Server) SaveContext(text string) (string, error)
- func (s *Server) Start() error
- func (s *Server) Stop() error
- func (s *Server) WithLogger(customLogger logx.Logger) *Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateComponents ¶
func CreateComponents(cfg *config.Config, logger logx.Logger) (contextstore.ContextStore, summarizer.Summarizer, vector.Embedder, error)
CreateComponents creates and initializes the components of the ProjectMemory service without creating a server instance. This is useful for components that need direct access to the store, summarizer, and embedder.
func GenerateHash ¶
GenerateHash creates a hash from the summary and a timestamp This is a convenience wrapper around the internal util.GenerateHash function
Types ¶
type Config ¶
Config represents the configuration for the ProjectMemory service.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default configuration for the ProjectMemory service.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the ProjectMemory service.
func NewServer ¶
NewServer creates a new ProjectMemory Server with the given configuration path and logger.
func (*Server) GetEmbedder ¶
GetEmbedder returns the embedder instance used by the server.
func (*Server) GetStore ¶
func (s *Server) GetStore() contextstore.ContextStore
GetStore returns the context store instance used by the server.
func (*Server) GetSummarizer ¶
func (s *Server) GetSummarizer() summarizer.Summarizer
GetSummarizer returns the summarizer instance used by the server.
func (*Server) RetrieveContext ¶
RetrieveContext retrieves context entries similar to the given query.
func (*Server) SaveContext ¶
SaveContext saves the given text to the context store.
func (*Server) WithLogger ¶ added in v0.1.3
WithLogger sets a custom logger for the server. This should be called immediately after creating the server with NewServer and before calling any other methods if you need to replace the logger used during initialization.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
projectmemory
command
|
|
|
examples
|
|
|
embed-in-mcp
command
|
|
|
internal
|
|
|
contextstore
Package contextstore provides the storage components for the context data used by the ProjectMemory service.
|
Package contextstore provides the storage components for the context data used by the ProjectMemory service. |
|
errortypes
Package errortypes provides error types and utilities for the projectmemory service.
|
Package errortypes provides error types and utilities for the projectmemory service. |
|
logger
Package logger provides a structured logging system for the projectmemory service.
|
Package logger provides a structured logging system for the projectmemory service. |
|
server
Package server provides the MCP server implementation for the ProjectMemory service.
|
Package server provides the MCP server implementation for the ProjectMemory service. |
|
summarizer
Package summarizer provides interfaces and implementations for summarizing text content within the ProjectMemory service.
|
Package summarizer provides interfaces and implementations for summarizing text content within the ProjectMemory service. |
|
summarizer/providers
Package providers contains implementations of different LLM providers for text summarization.
|
Package providers contains implementations of different LLM providers for text summarization. |
|
telemetry
Package telemetry provides metrics collection and reporting for monitoring the LLM-Memory service performance.
|
Package telemetry provides metrics collection and reporting for monitoring the LLM-Memory service performance. |
|
tools
Package tools defines the interfaces and data structures for the ProjectMemory service.
|
Package tools defines the interfaces and data structures for the ProjectMemory service. |
|
vector
Package vector provides vector embedding utilities and text embedding within the ProjectMemory service.
|
Package vector provides vector embedding utilities and text embedding within the ProjectMemory service. |