Documentation
¶
Index ¶
- type Azure
- type BrowseAction
- type Browser
- func (browser *Browser) Close() error
- func (browser *Browser) Connect(ctx context.Context, conn io.ReadWriteCloser) error
- func (browser *Browser) Description() string
- func (browser *Browser) ExecuteScript(script string) string
- func (browser *Browser) GenerateSchema() interface{}
- func (browser *Browser) Initialize() error
- func (browser *Browser) Name() string
- func (browser *Browser) Navigate(url string) error
- func (browser *Browser) Run(args map[string]any) (string, error)
- func (browser *Browser) SetProxy(proxyURL string)
- func (browser *Browser) StartSession() error
- func (browser *Browser) Use(ctx context.Context, args map[string]any) string
- type BrowserArgs
- type Container
- func (c *Container) Connect(ctx context.Context, conn io.ReadWriteCloser) error
- func (c *Container) Description() string
- func (c *Container) GenerateSchema() interface{}
- func (c *Container) Initialize() error
- func (c *Container) Name() string
- func (c *Container) Use(ctx context.Context, params map[string]any) string
- type Cookie
- type Github
- type Human
- type HumanMode
- type Neo4j
- func (n *Neo4j) Close() error
- func (n *Neo4j) Connect() error
- func (neo4j *Neo4j) GenerateSchema() string
- func (n *Neo4j) Initialize() error
- func (n *Neo4j) Query(query string) (out []map[string]interface{}, err error)
- func (neo4j *Neo4j) Use(ctx context.Context, args map[string]any) string
- func (n *Neo4j) Write(query string) neo4j.ResultWithContext
- type Neo4jQuery
- func (n *Neo4jQuery) Connect(ctx context.Context, rw io.ReadWriteCloser) error
- func (n *Neo4jQuery) Description() string
- func (n *Neo4jQuery) GenerateSchema() interface{}
- func (n *Neo4jQuery) Initialize() error
- func (n *Neo4jQuery) Name() string
- func (n *Neo4jQuery) Use(ctx context.Context, args map[string]any) string
- type Neo4jStore
- func (n *Neo4jStore) Connect(ctx context.Context, rw io.ReadWriteCloser) error
- func (n *Neo4jStore) Description() string
- func (n *Neo4jStore) GenerateSchema() interface{}
- func (n *Neo4jStore) Initialize() error
- func (n *Neo4jStore) Name() string
- func (n *Neo4jStore) Use(ctx context.Context, args map[string]any) string
- type NetworkRequest
- type Qdrant
- func (q *Qdrant) Add(docs []string, metadata map[string]any) string
- func (q *Qdrant) AddDocuments(docs []schema.Document) error
- func (q *Qdrant) Connect() error
- func (qdrant *Qdrant) GenerateSchema() string
- func (q *Qdrant) Initialize() error
- func (q *Qdrant) Query(query string) ([]map[string]interface{}, error)
- func (q *Qdrant) SimilaritySearch(query string, k int, opts ...vectorstores.Option) ([]schema.Document, error)
- func (qdrant *Qdrant) Use(ctx context.Context, args map[string]any) string
- type QdrantQuery
- func (q *QdrantQuery) Connect(ctx context.Context, rw io.ReadWriteCloser) error
- func (q *QdrantQuery) Description() string
- func (q *QdrantQuery) GenerateSchema() interface{}
- func (q *QdrantQuery) Initialize() error
- func (q *QdrantQuery) Name() string
- func (q *QdrantQuery) Use(ctx context.Context, args map[string]any) string
- type QdrantResult
- type QdrantStore
- func (q *QdrantStore) Connect(ctx context.Context, rw io.ReadWriteCloser) error
- func (q *QdrantStore) Description() string
- func (q *QdrantStore) GenerateSchema() interface{}
- func (q *QdrantStore) Initialize() error
- func (q *QdrantStore) Name() string
- func (q *QdrantStore) Use(ctx context.Context, args map[string]any) string
- type Slack
- type Trengo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Azure ¶
type Azure struct {
Operation string `` /* 158-byte string literal not displayed */
}
func (*Azure) Description ¶
func (*Azure) GenerateSchema ¶
func (azure *Azure) GenerateSchema() interface{}
type BrowseAction ¶
type Browser ¶
type Browser struct {
Operation string `json:"operation" jsonschema:"title=Operation,description=The operation to perform,enum=navigate,enum=script"`
URL string `json:"url" jsonschema:"title=URL,description=The URL to navigate to,required"`
Javascript string `` /* 253-byte string literal not displayed */
// contains filtered or unexported fields
}
func NewBrowser ¶
func NewBrowser() *Browser
func (*Browser) Description ¶
func (*Browser) ExecuteScript ¶
ExecuteScript runs custom JavaScript and returns the result
func (*Browser) GenerateSchema ¶
func (browser *Browser) GenerateSchema() interface{}
func (*Browser) Initialize ¶
func (*Browser) StartSession ¶
StartSession initializes a new browsing session with stealth mode
type BrowserArgs ¶
type BrowserArgs struct {
URL string `json:"url" jsonschema:"required,description=The URL to navigate to"`
Selector string `json:"selector" jsonschema:"description=CSS selector to find elements"`
Timeout int `json:"timeout" jsonschema:"description=Timeout in seconds"`
Screenshot bool `json:"screenshot" jsonschema:"description=Whether to take a screenshot"`
}
type Container ¶
type Container struct {
Reasoning string `json:"reasoning" jsonschema:"title=Reasoning,description=Your reasoning for the next step."`
Command string `json:"command" jsonschema:"title=Command,description=The valid bash command to execute for the next step."`
// contains filtered or unexported fields
}
func NewContainer ¶
func NewContainer() *Container
func (*Container) Description ¶
func (*Container) GenerateSchema ¶
func (c *Container) GenerateSchema() interface{}
func (*Container) Initialize ¶
type Github ¶
type Github struct {
Repo string `json:"repository" jsonschema:"title=Repository,description=The repository to use,required"`
Operation string `json:"operation" jsonschema:"title=Operation,description=The operation to perform,enum=clone,enum=pull,enum=push,required"`
}
func (*Github) Description ¶
func (*Github) GenerateSchema ¶
func (g *Github) GenerateSchema() interface{}
type Human ¶
type Human struct {
Message string `json:"message" jsonschema:"title=Message,description=The message to send to the human user,required"`
// contains filtered or unexported fields
}
Human is a tool wrapper that has two distinct modes:
- It can be configured to call back to the human user to ask for intermediate input.
- It can be configured to act as a human user proxy, where an agent will perform the role of the human user.
func (*Human) Description ¶
func (*Human) GenerateSchema ¶
func (human *Human) GenerateSchema() interface{}
type Neo4j ¶
type Neo4j struct {
Operation string `json:"operation" jsonschema:"title=Operation,description=The operation to perform,enum=recall,enum=store,required"`
Cypher string `json:"cypher" jsonschema:"title=Cypher,description=The Cypher query to execute,required"`
Reasoning string `json:"reasoning" jsonschema:"title=Reasoning,description=Explanation of why this relationship pattern is relevant"`
// contains filtered or unexported fields
}
Neo4j is a wrapper around the Neo4j database that turns it into a tool, usable by the agent.
func (*Neo4j) GenerateSchema ¶
GenerateSchema implements the Tool interface and renders the schema as a jsonschema string, which can be injected into the prompt. It is used to explain to the agent how to use the tool.
func (*Neo4j) Initialize ¶
Initialize initializes the Neo4j client.
type Neo4jQuery ¶
type Neo4jQuery struct {
Cypher string `json:"cypher" jsonschema:"title=Cypher Query,description=The Cypher query to execute,required"`
Reasoning string `json:"reasoning" jsonschema:"title=Reasoning,description=Explanation of why this query pattern is relevant"`
// contains filtered or unexported fields
}
Neo4jQuery is a tool wrapper for querying a Neo4j database.
func NewNeo4jQuery ¶
func NewNeo4jQuery() *Neo4jQuery
func (*Neo4jQuery) Connect ¶
func (n *Neo4jQuery) Connect(ctx context.Context, rw io.ReadWriteCloser) error
func (*Neo4jQuery) Description ¶
func (n *Neo4jQuery) Description() string
func (*Neo4jQuery) GenerateSchema ¶
func (n *Neo4jQuery) GenerateSchema() interface{}
func (*Neo4jQuery) Initialize ¶
func (n *Neo4jQuery) Initialize() error
func (*Neo4jQuery) Name ¶
func (n *Neo4jQuery) Name() string
type Neo4jStore ¶
type Neo4jStore struct {
Cypher string `json:"cypher" jsonschema:"title=Cypher Query,description=The Cypher query to create or update relationships,required"`
Reasoning string `json:"reasoning" jsonschema:"title=Reasoning,description=Explanation of why these relationships should be stored"`
// contains filtered or unexported fields
}
func NewNeo4jStore ¶
func NewNeo4jStore() *Neo4jStore
func (*Neo4jStore) Connect ¶
func (n *Neo4jStore) Connect(ctx context.Context, rw io.ReadWriteCloser) error
func (*Neo4jStore) Description ¶
func (n *Neo4jStore) Description() string
func (*Neo4jStore) GenerateSchema ¶
func (n *Neo4jStore) GenerateSchema() interface{}
func (*Neo4jStore) Initialize ¶
func (n *Neo4jStore) Initialize() error
func (*Neo4jStore) Name ¶
func (n *Neo4jStore) Name() string
type NetworkRequest ¶
type Qdrant ¶
type Qdrant struct {
Operation string `json:"operation" jsonschema:"title=Operation,description=The operation to perform,enum=add,enum=query,required"`
SearchText string `json:"query" jsonschema:"title=Query,description=The search text for query operation"`
Documents []string `json:"documents" jsonschema:"title=Documents,description=The text content to add"`
Metadata map[string]any `json:"metadata" jsonschema:"title=Metadata,description=Additional context for stored documents"`
Reasoning string `json:"reasoning" jsonschema:"title=Reasoning,description=Explanation of why this content is semantically relevant"`
// contains filtered or unexported fields
}
Qdrant is a wrapper around the vector store that turns it into a tool, usable by the agent.
func (*Qdrant) AddDocuments ¶
AddDocuments is a wrapper around the qdrant.Store.AddDocuments method.
func (*Qdrant) GenerateSchema ¶
GenerateSchema implements the Tool interface and renders the schema as a jsonschema string, which can be injected into the prompt. It is used to explain to the agent how to use the tool.
func (*Qdrant) Initialize ¶
Initialize initializes the Qdrant client.
func (*Qdrant) SimilaritySearch ¶
func (q *Qdrant) SimilaritySearch(query string, k int, opts ...vectorstores.Option) ([]schema.Document, error)
SimilaritySearch is a wrapper around the qdrant.Store.SimilaritySearch method.
type QdrantQuery ¶
type QdrantQuery struct {
Query string `json:"query" jsonschema:"title=Query,description=The search text to find similar content,required"`
Reasoning string `json:"reasoning" jsonschema:"title=Reasoning,description=Explanation of why this search is relevant"`
// contains filtered or unexported fields
}
func NewQdrantQuery ¶
func NewQdrantQuery(collection string, dimension uint64) *QdrantQuery
func (*QdrantQuery) Connect ¶
func (q *QdrantQuery) Connect(ctx context.Context, rw io.ReadWriteCloser) error
func (*QdrantQuery) Description ¶
func (q *QdrantQuery) Description() string
func (*QdrantQuery) GenerateSchema ¶
func (q *QdrantQuery) GenerateSchema() interface{}
func (*QdrantQuery) Initialize ¶
func (q *QdrantQuery) Initialize() error
func (*QdrantQuery) Name ¶
func (q *QdrantQuery) Name() string
type QdrantResult ¶
type QdrantResult struct {
Metadata map[string]any `json:"metadata"`
Content string `json:"content"`
}
Query is a wrapper around the qdrant.Store.SimilaritySearch method.
type QdrantStore ¶
type QdrantStore struct {
Documents []string `json:"documents" jsonschema:"title=Documents,description=The text content to store,required"`
Metadata map[string]any `json:"metadata" jsonschema:"title=Metadata,description=Additional context for stored documents"`
Reasoning string `json:"reasoning" jsonschema:"title=Reasoning,description=Explanation of why this content should be stored"`
// contains filtered or unexported fields
}
func NewQdrantStore ¶
func NewQdrantStore(collection string, dimension uint64) *QdrantStore
func (*QdrantStore) Connect ¶
func (q *QdrantStore) Connect(ctx context.Context, rw io.ReadWriteCloser) error
func (*QdrantStore) Description ¶
func (q *QdrantStore) Description() string
func (*QdrantStore) GenerateSchema ¶
func (q *QdrantStore) GenerateSchema() interface{}
func (*QdrantStore) Initialize ¶
func (q *QdrantStore) Initialize() error
func (*QdrantStore) Name ¶
func (q *QdrantStore) Name() string
type Slack ¶
type Slack struct {
Operation string `json:"operation" jsonschema:"title=Operation,description=The operation to perform,enum=send_message,enum=search,required"`
Channel string `json:"channel" jsonschema:"title=Channel,description=The channel to send the message to"`
Message string `json:"message" jsonschema:"title=Message,description=The message to send"`
}
Slack wraps the Slack API and turns it into a tool for agents to use. As a special case, this tool needs to also bring up a server to listen for incoming events.
func (*Slack) Description ¶
func (*Slack) GenerateSchema ¶
func (slack *Slack) GenerateSchema() interface{}
type Trengo ¶
type Trengo struct {
Operation string `` /* 135-byte string literal not displayed */
}
func (*Trengo) Description ¶
func (*Trengo) GenerateSchema ¶
func (trengo *Trengo) GenerateSchema() interface{}