Documentation
¶
Index ¶
- func CreateComponents(config *Config) (contextstore.ContextStore, summarizer.Summarizer, vector.Embedder, error)
- func GenerateHash(content string, timestamp int64) string
- type Config
- type Server
- func (s *Server) ClearAllContext() error
- func (s *Server) DeleteContext(id string) error
- func (s *Server) GetEmbedder() vector.Embedder
- func (s *Server) GetLogger() *logger.Logger
- func (s *Server) GetStore() contextstore.ContextStore
- func (s *Server) GetSummarizer() summarizer.Summarizer
- func (s *Server) ReplaceContext(id string, contextText string) (string, error)
- func (s *Server) RetrieveContext(query string, limit int) ([]string, error)
- func (s *Server) SaveContext(contextText string) (string, error)
- func (s *Server) Start() error
- func (s *Server) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateComponents ¶
func CreateComponents(config *Config) (contextstore.ContextStore, summarizer.Summarizer, vector.Embedder, error)
CreateComponents creates and initializes the core components without starting the server. This is useful when you want to use ProjectMemory components in your own MCP server.
func GenerateHash ¶
GenerateHash creates a SHA-256 hash from content and a timestamp
Types ¶
type Config ¶
type Config struct {
Models struct {
Provider string `json:"provider"`
ModelID string `json:"modelId"`
MaxTokens int `json:"maxTokens"`
Temperature float32 `json:"temperature"`
} `json:"models"`
Database struct {
Path string `json:"path"`
} `json:"database"`
Logging struct {
Level string `json:"level"`
Format string `json:"format"`
} `json:"logging"`
}
Config represents the configuration structure for the ProjectMemory service.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a configuration with sensible defaults
func LoadConfig ¶
LoadConfig loads configuration from the specified file path
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a ProjectMemory server instance
func (*Server) ClearAllContext ¶
ClearAllContext removes all context entries from the store
func (*Server) DeleteContext ¶
DeleteContext deletes a specific context entry by ID
func (*Server) GetEmbedder ¶
GetEmbedder returns the server's embedder
func (*Server) GetStore ¶
func (s *Server) GetStore() contextstore.ContextStore
GetStore returns the server's context store
func (*Server) GetSummarizer ¶
func (s *Server) GetSummarizer() summarizer.Summarizer
GetSummarizer returns the server's summarizer
func (*Server) ReplaceContext ¶
ReplaceContext replaces an existing context with new content
func (*Server) RetrieveContext ¶
RetrieveContext retrieves relevant context based on a query
func (*Server) SaveContext ¶
SaveContext saves a context text to the memory store
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. |
|
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. |