Documentation
¶
Index ¶
- type ACSSearchResponse
- type AnsysGPTCitation
- type AnsysGPTDefaultFields
- type AnsysGPTRetrieverModuleChunk
- type CodeGenerationElement
- type CodeGenerationExample
- type CodeGenerationType
- type CodeGenerationUserGuideSection
- type ConversationHistoryMessage
- type DBListCollectionsOutput
- type DataExtractionDocumentData
- type DbAddDataInput
- type DbAddDataOutput
- type DbArrayFilter
- type DbCreateCollectionInput
- type DbCreateCollectionOutput
- type DbData
- type DbFilters
- type DbJsonFilter
- type DbResponse
- type DiscoveryAttachment
- type DiscoveryBoundaryCondition
- type DiscoveryDimensions
- type DiscoveryMaterial
- type DiscoveryMonitors
- type DiscoverySimulationInput
- type EmbeddingOptions
- type EmbeddingResult
- type ErrorResponse
- type ExecRequest
- type ExecResponse
- type ExecutionDetails
- type ExecutionInstruction
- type Feedback
- type FileDetails
- type FilledInputOutput
- type FlowKitPythonFunction
- type FunctionDefinition
- type FunctionDefinitionShort
- type FunctionInput
- type FunctionOutput
- type GeneralNeo4jQueryInput
- type GeneralNeo4jQueryOutput
- type GraphDbValueType
- type HandlerRequest
- type HandlerResponse
- type HistoricMessage
- type MCPConfig
- type MCPContentItem
- type MCPPrompt
- type MCPPromptArgument
- type MCPResource
- type MCPTool
- type MaterialAttribute
- type MaterialCriterionWithGuid
- type MaterialLlmCriterion
- type ModelOptions
- type Neo4jResponse
- type SessionContext
- type SlashCommand
- type ToolCall
- type ToolResult
- type TransferDetails
- type XMLMemberExample
- type XMLMemberExampleCode
- type XMLMemberParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACSSearchResponse ¶
type ACSSearchResponse struct {
Physics string `json:"physics"`
SourceTitleLvl3 string `json:"sourceTitle_lvl3"`
SourceURLLvl3 string `json:"sourceURL_lvl3"`
TokenSize int `json:"tokenSize"`
SourceTitleLvl2 string `json:"sourceTitle_lvl2"`
Weight float64 `json:"weight"`
SourceURLLvl2 string `json:"sourceURL_lvl2"`
Product string `json:"product"`
Content string `json:"content"`
TypeOFasset string `json:"typeOFasset"`
Version string `json:"version"`
SearchScore float64 `json:"@search.score"`
SearchRerankerScore float64 `json:"@search.rerankerScore"`
IndexName string `json:"indexName"`
}
ACSSearchResponse represents the response from the ACS search.
type AnsysGPTCitation ¶
type AnsysGPTCitation struct {
Title string `json:"Title"`
URL string `json:"URL"`
Relevance float64 `json:"Relevance"`
}
AnsysGPTCitation represents the citation from the AnsysGPT.
type AnsysGPTDefaultFields ¶
DefaultFields represents the default fields for the user query.
type AnsysGPTRetrieverModuleChunk ¶ added in v1.0.3
type AnsysGPTRetrieverModuleChunk struct {
Captions string `json:"@search.captions"`
Highlights string `json:"@search.highlights"`
RerankerScore float64 `json:"@search.reranker_score"`
Score float64 `json:"@search.score"`
Content string `json:"content"`
IndexName string `json:"index_name"`
Physics string `json:"physics"`
Product string `json:"product"`
SourceTitleLvl2 string `json:"sourceTitle_lvl2"`
SourceTitleLvl3 string `json:"sourceTitle_lvl3"`
SourceUrlLvl2 string `json:"sourceURL_lvl2"`
SourceUrlLvl3 string `json:"sourceURL_lvl3"`
TokenSize int `json:"token_size"`
TypeOfAsset string `json:"typeOFasset"`
Version string `json:"version"`
Weight float64 `json:"weight"`
}
RetrieverModuleChunk represents a chunk of data context received from the retriever module.
type CodeGenerationElement ¶
type CodeGenerationElement struct {
Guid uuid.UUID `json:"guid"`
Type CodeGenerationType `json:"type"`
NamePseudocode string `json:"name_pseudocode"` // Function name without dependencies
NameFormatted string `json:"name_formatted"` // Name of the function with spaces and without parameters
Description string `json:"description"`
Name string `json:"name"`
Dependencies []string `json:"dependencies"`
Summary string `json:"summary"`
ReturnType string `json:"return"`
ReturnElementList []string `json:"return_element_list"`
ReturnDescription string `json:"return_description"` // Return description
Remarks string `json:"remarks"`
// Only for type "function" or "method"
Parameters []XMLMemberParam `json:"parameters"`
Example XMLMemberExample `json:"example"`
// Only for type "enum"
EnumValues []string `json:"enum_values"`
// Metadata for databases
VectorDBMetadata any `json:"vector_db_metadata,omitempty"` // Optional metadata for vector databases
GraphDBMetadata any `json:"graph_db_metadata,omitempty"` // Optional metadata for graph databases
}
type CodeGenerationExample ¶
type CodeGenerationType ¶
type CodeGenerationType string
Enum values for CodeGenerationType
const ( Function CodeGenerationType = "Function" Method CodeGenerationType = "Method" Class CodeGenerationType = "Class" Parameter CodeGenerationType = "Parameter" Enum CodeGenerationType = "Enum" Module CodeGenerationType = "Module" )
type CodeGenerationUserGuideSection ¶
type CodeGenerationUserGuideSection struct {
Name string `json:"name"`
Title string `json:"title"`
IsFirstChild bool `json:"is_first_child"`
NextSibling string `json:"next_sibling"`
NextParent string `json:"next_parent"`
DocumentName string `json:"document_name"`
Parent string `json:"parent"`
Content string `json:"content"`
Level int `json:"level"`
Link string `json:"link"`
ReferencedLinks []string `json:"referenced_links"`
Chunks []string `json:"chunks"`
}
type ConversationHistoryMessage ¶
type ConversationHistoryMessage struct {
MessageId string `json:"message_id"`
Role string `json:"role"`
Content string `json:"content"`
Images []string `json:"images"` // image in base64 format
PositiveFeedback bool `json:"positive_feedback"`
NegativeFeedback bool `json:"negative_feedback"`
FeedbackText string `json:"feedback_text,omitempty"` // Optional feedback text
}
ConversationHistoryMessage is a structure that contains the message ID, role, content, and images of a conversation history message.
type DBListCollectionsOutput ¶
type DBListCollectionsOutput struct {
Success bool `json:"success" description:"Returns true if the collections were listed successfully. Returns false or an error if not."`
Collections []string `json:"collections" description:"A list of collection names."`
}
DBListCollectionsOutput represents the output of listing collections in the database.
type DataExtractionDocumentData ¶
type DataExtractionDocumentData struct {
DocumentName string `json:"documentName"`
DocumentId string `json:"documentId"`
Guid uuid.UUID `json:"guid"`
Level string `json:"level"`
ChildIds []string `json:"childIds"`
ParentId string `json:"parentId"`
PreviousSiblingId string `json:"previousSiblingId"`
NextSiblingId string `json:"nextSiblingId"`
LastChildId string `json:"lastChildId"`
FirstChildId string `json:"firstChildId"`
Text string `json:"text"`
Keywords []string `json:"keywords"`
Summary string `json:"summary"`
Embedding []float32 `json:"embedding"`
}
DataExtractionDocumentData represents the data extracted from a document.
type DbAddDataInput ¶
type DbAddDataInput struct {
CollectionName string `` /* 142-byte string literal not displayed */
Data []DbData `json:"data" description:"Data objects to be added to the DB." required:"true"`
}
DbAddDataInput represents the input for adding data to the database.
type DbAddDataOutput ¶
type DbAddDataOutput struct {
Success bool `json:"success" description:"Returns true if the data was added successfully. Returns false or an error if not."`
IgnoredObjectsCount int `json:"ignored_objects_count" description:"Number of ignored documents."`
Error string `json:"error" description:"Error message if the collection could not be created."`
}
DbAddDataOutput represents the output of adding data to the database.
type DbArrayFilter ¶
DbArrayFilter represents the filter for an array field in the database.
type DbCreateCollectionInput ¶
type DbCreateCollectionInput struct {
CollectionName string `` /* 142-byte string literal not displayed */
}
DbCreateCollectionInput represents the input for creating a collection in the database.
type DbCreateCollectionOutput ¶
type DbCreateCollectionOutput struct {
Success bool `json:"success" description:"Returns true if the collection was created successfully. Returns false or an error if not."`
Error string `json:"error" description:"Error message if the collection could not be created."`
}
DbCreateCollectionOutput represents the output of creating a collection in the database.
type DbData ¶
type DbData struct {
Guid uuid.UUID `json:"guid"`
DocumentId string `json:"document_id"`
DocumentName string `json:"document_name"`
Text string `json:"text"`
Keywords []string `json:"keywords"`
Summary string `json:"summary"`
Embedding []float32 `json:"embeddings"`
Tags []string `json:"tags"`
Metadata map[string]interface{} `json:"metadata"`
ParentId *uuid.UUID `json:"parent_id"`
ChildIds []uuid.UUID `json:"child_ids"`
PreviousSiblingId *uuid.UUID `json:"previous_sibling_id"`
NextSiblingId *uuid.UUID `json:"next_sibling_id"`
LastChildId *uuid.UUID `json:"last_child_id"`
FirstChildId *uuid.UUID `json:"first_child_id"`
Level int `json:"level"`
HasNeo4jEntry bool `json:"has_neo4j_entry"`
}
DbData represents the data stored in the database.
type DbFilters ¶
type DbFilters struct {
// Filters for string fields
GuidFilter []string `json:"guid,omitempty"`
DocumentIdFilter []string `json:"document_id,omitempty"`
DocumentNameFilter []string `json:"document_name,omitempty"`
LevelFilter []string `json:"level,omitempty"`
// Filters for array fields
TagsFilter DbArrayFilter `json:"tags,omitempty"`
KeywordsFilter DbArrayFilter `json:"keywords,omitempty"`
// Filters for JSON fields
MetadataFilter []DbJsonFilter `json:"metadata,omitempty"`
}
DbFilters represents the filters for the database.
type DbJsonFilter ¶
type DbJsonFilter struct {
FieldName string `json:"fieldName"`
FieldType string `json:"fieldType" description:"Can be either string or array."` // "string" or "array"
FilterData []string `json:"filterData"`
NeedAll bool `json:"needAll" description:"Only needed if the FieldType is array."` // only needed for array fields
}
DbJsonFilter represents the filter for a JSON field in the database.
type DbResponse ¶
type DbResponse struct {
// Standard DbResponse fields
Guid uuid.UUID `json:"guid"`
DocumentId string `json:"document_id"`
DocumentName string `json:"document_name"`
Text string `json:"text"`
Keywords []string `json:"keywords"`
Summary string `json:"summary"`
Embedding []float32 `json:"embeddings"`
Tags []string `json:"tags"`
Metadata map[string]interface{} `json:"metadata"`
ParentId *uuid.UUID `json:"parent_id"`
ChildIds []uuid.UUID `json:"child_ids"`
PreviousSiblingId *uuid.UUID `json:"previous_sibling_id"`
NextSiblingId *uuid.UUID `json:"next_sibling_id"`
LastChildId *uuid.UUID `json:"last_child_id"`
FirstChildId *uuid.UUID `json:"first_child_id"`
Distance float64 `json:"distance"`
Level int `json:"level"`
HasNeo4jEntry bool `json:"has_neo4j_entry"`
// Siblings
Parent *DbData `json:"parent,omitempty"`
Children []DbData `json:"children,omitempty"`
LeafNodes []DbData `json:"leaf_nodes,omitempty"`
Siblings []DbData `json:"siblings,omitempty"`
// From StoreElementsInVectorDatabase payload
Type string `json:"type,omitempty"`
NamePseudocode string `json:"name_pseudocode,omitempty"`
NameFormatted string `json:"name_formatted,omitempty"`
Name string `json:"name,omitempty"`
ParentClass string `json:"parent_class,omitempty"`
// From StoreExamplesInVectorDatabase payload
Dependencies []interface{} `json:"dependencies,omitempty"`
DependencyEquivalences map[string]interface{} `json:"dependency_equivalences,omitempty"`
PreviousChunk string `json:"previous_chunk,omitempty"`
NextChunk string `json:"next_chunk,omitempty"`
// From StoreUserGuideSectionsInVectorDatabase payload
SectionName string `json:"section_name,omitempty"`
Title string `json:"title,omitempty"`
ParentSectionName string `json:"parent_section_name,omitempty"`
}
DbResponse can accommodate non-conflicting data from: - StoreElementsInVectorDatabase (API/Element data) - StoreExamplesInVectorDatabase (Example data) - StoreUserGuideSectionsInVectorDatabase (User guide data) - Standard document data
type DiscoveryAttachment ¶ added in v1.0.5
Attachment holds auxiliary binary payloads (e.g., base64-encoded uploads).
type DiscoveryBoundaryCondition ¶ added in v1.0.5
type DiscoveryBoundaryCondition struct {
ProxyGuid string `json:"proxyGuid"`
ProxyLabel string `json:"proxyLabel"`
Type string `json:"type"`
Details map[string]interface{} `json:"details,omitempty"`
}
BoundaryCondition represents physics constraints for the simulation.
type DiscoveryDimensions ¶ added in v1.0.5
type DiscoveryDimensions struct {
X float64 `json:"x"`
Y float64 `json:"y"`
Z float64 `json:"z"`
Units string `json:"units"`
}
Dimensions defines spatial extents and their units.
type DiscoveryMaterial ¶ added in v1.0.5
type DiscoveryMaterial struct {
Guid string `json:"guid"`
Label string `json:"label"`
State string `json:"state"`
Details map[string]interface{} `json:"details,omitempty"`
}
Material describes a labeled material state.
type DiscoveryMonitors ¶ added in v1.0.5
type DiscoverySimulationInput ¶ added in v1.0.5
type DiscoverySimulationInput struct {
SimulationName string `json:"simulationName"`
SimulationType string `json:"simulationType"`
Model string `json:"model"`
Objective string `json:"objective"`
UserID string `json:"userId"`
OtherInformation string `json:"otherInformation,omitempty"`
Dimensions DiscoveryDimensions `json:"dimensions"`
Materials []DiscoveryMaterial `json:"materials"`
BoundaryConditions []DiscoveryBoundaryCondition `json:"boundaryConditions"`
Attachments []DiscoveryAttachment `json:"attachments,omitempty"`
Monitors []DiscoveryMonitors `json:"monitors,omitempty"`
}
SimulationInput captures the schema for simulation validation payloads.
type EmbeddingOptions ¶
type EmbeddingOptions struct {
ReturnDense *bool `json:"returnDense"` // Include dense vectors in response
ReturnSparse *bool `json:"returnSparse"` // Include lexical weights in response
ReturnColbert *bool `json:"returnColbert"` // Include colbert vectors in response
}
EmbeddingOptions represents the options for an embeddings request.
type EmbeddingResult ¶ added in v1.0.3
EmbeddingResult holds both dense and sparse embeddings
type ErrorResponse ¶
ErrorResponse represents the error response sent to the client when something fails during the processing of the request.
type ExecRequest ¶
type ExecRequest struct {
Type string `json:"type"` // "code", "flowkit"
Action string `json:"action"` // type "code":"execute", "append", "cancel", "status"; for type "flowkit": "<functionName>"
InstructionGuid string `json:"instructionGuid"`
ExecutionInstruction *ExecutionInstruction `json:"executionInstruction"` // only for type "code"
Inputs map[string]FilledInputOutput `json:"inputs"` // only for type "flowkit"
}
ExecRequest represents the requests that can be sent to aali-exec
type ExecResponse ¶
type ExecResponse struct {
Type string `json:"type"` // "status", "flowkit", "file", "error"
InstructionGuid string `json:"instructionGuid"`
Error *ErrorResponse `json:"error,omitempty"`
ExecutionDetails *ExecutionDetails `json:"executionDetails,omitempty"`
FileDetails *FileDetails `json:"fileDetails,omitempty"`
Outputs map[string]FilledInputOutput `json:"outputs"` // only for type "flowkit"
}
ExecResponse represents the response that aali-exec sends back
type ExecutionDetails ¶
type ExecutionDetails struct {
InstructionGuid string `json:"instructionGuid"`
ClientGuid string `json:"clientGuid"`
StartTime time.Time `json:"startTime"`
TimeoutAt time.Time `json:"timeoutAt"`
Response string `json:"response"`
Status string `json:"status"` // "started", "running", "completed", "failed"
LastResponseDiff string `json:"lastResponseDiff"`
InterruptionChannel chan bool `json:"-"`
StdinChannel chan []string `json:"-"`
Cancelled bool `json:"-"`
}
ExecutionDetails represents the details of the execution
type ExecutionInstruction ¶
type ExecutionInstruction struct {
CodeType string `json:"codeType"` // "python", "bash"
Code []string `json:"code"`
VenvExecutable string `json:"venvExecutable"`
}
ExecutionInstruction contain an array of strings that represent the code to be executed in aali-exec
type Feedback ¶
type Feedback struct {
ConversationHistory []ConversationHistoryMessage `json:"conversation"`
MessageId string `json:"message_id"`
AddPositive bool `json:"add_positive"`
AddNegative bool `json:"add_negative"`
RemovePositive bool `json:"remove_positive"`
RemoveNegative bool `json:"remove_negative"`
FeedbackText string `json:"feedback_text,omitempty"` // Optional feedback text
}
Feedback is a structure that contains the conversation history, message ID, and feedback options of a workflow feedback.
type FileDetails ¶
type FileDetails struct {
FileName string `json:"fileName"`
FileSize int64 `json:"fileSize"`
FileChunkNumber int `json:"fileChunkNumber"`
FileChunk []byte `json:"fileChunk"`
IsLastChunk bool `json:"isLastChunk"`
}
FileDetails contain parts of a file that is being sent
type FilledInputOutput ¶
type FilledInputOutput struct {
Name string `json:"name" yaml:"name"`
GoType string `json:"go_type" yaml:"go_type"`
Value interface{} `json:"value" yaml:"value"`
}
FilledInputOutput is a struct that contains the name, go type and value of a filled input/output
type FlowKitPythonFunction ¶
type FlowKitPythonFunction struct {
Name string `json:"name"`
Path string `json:"path"`
Description string `json:"description"`
Category string `json:"category"`
DisplayName string `json:"display_name"`
Inputs []FunctionInput `json:"inputs"`
Outputs []FunctionOutput `json:"outputs"`
Definitions interface{} `json:"definitions"`
}
FlowKitPythonFunction is a struct that contains the name, path, description, inputs, outputs and definitions of a FlowKit-Python function
type FunctionDefinition ¶
type FunctionDefinition struct {
Name string `json:"name" yaml:"name"`
FlowkitUrl string `json:"flowkit_url" yaml:"flowkit_url"` // URL of the connected FlowKit server containing this function
ApiKey string `json:"api_key" yaml:"api_key"` // API key for the FlowKit server
DisplayName string `json:"display_name" yaml:"display_name"`
Description string `json:"description" yaml:"description"`
Category string `json:"category" yaml:"category"` // "data_extraction", "generic", "knowledge_db", "llm_handler", "ansys_gpt"
Type string `json:"type" yaml:"type"` // "go", "python"
Path string `json:"path" yaml:"path"` // only for python functions
Inputs []FunctionInput `json:"inputs" yaml:"inputs"`
Outputs []FunctionOutput `json:"outputs" yaml:"outputs"`
DeprecatedParams []string `json:"deprecated_params" yaml:"deprecated_params"` // list of deprecated parameter names
}
FunctionDefinition is a struct that contains the id, name, description, package, inputs and outputs of a function
type FunctionDefinitionShort ¶
type FunctionDefinitionShort struct {
Name string `json:"name" yaml:"name"`
FlowkitUrl string `json:"flowkit_url" yaml:"flowkit_url"` // URL of the connected FlowKit server containing this function
DisplayName string `json:"display_name" yaml:"display_name"`
Description string `json:"description" yaml:"description"`
Category string `json:"category" yaml:"category"` // "data_extraction", "generic", "knowledge_db", "llm_handler", "ansys_gpt"
Type string `json:"type" yaml:"type"` // "go", "python"
Path string `json:"path" yaml:"path"` // only for python functions
Inputs []FunctionInput `json:"inputs" yaml:"inputs"`
Outputs []FunctionOutput `json:"outputs" yaml:"outputs"`
DeprecatedParams []string `json:"deprecated_params" yaml:"deprecated_params"` // list of deprecated parameter names
}
FunctionDefinitionShort is equivalent to FunctionDefinition but without the API key (used for aali-agent rest API)
type FunctionInput ¶
type FunctionInput struct {
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"` // string, number, boolean, json
GoType string `json:"go_type" yaml:"go_type"`
Options []string `json:"options" yaml:"options"` // only applicable if not empty
}
FunctionInput is a struct that contains the name, type, go type and options of a function input
type FunctionOutput ¶
type FunctionOutput struct {
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"` // string, number, boolean, json
GoType string `json:"go_type" yaml:"go_type"`
}
FunctionOutput is a struct that contains the name, type and go type of a function output
type GeneralNeo4jQueryInput ¶
type GeneralNeo4jQueryInput struct {
Query string `json:"query" description:"Neo4j query to be executed. Required for executing a query." required:"true"`
}
GeneralNeo4jQueryInput represents the input for executing a Neo4j query.
type GeneralNeo4jQueryOutput ¶
type GeneralNeo4jQueryOutput struct {
Success bool `json:"success" description:"Returns true if the query was executed successfully. Returns false or an error if not."`
Response Neo4jResponse `json:"response" description:"Summary and records of the query execution."`
}
GeneralNeo4jQueryOutput represents the output of executing a Neo4j query.
type GraphDbValueType ¶ added in v1.0.3
type GraphDbValueType string
const ( Bool GraphDbValueType = "bool" Int64 GraphDbValueType = "int64" Int32 GraphDbValueType = "int32" Int16 GraphDbValueType = "int16" Int8 GraphDbValueType = "int8" UInt64 GraphDbValueType = "uint64" UInt32 GraphDbValueType = "uint32" UInt16 GraphDbValueType = "uint16" UInt8 GraphDbValueType = "uint8" Int128 GraphDbValueType = "int128" Double GraphDbValueType = "double" Float GraphDbValueType = "float" Date GraphDbValueType = "date" Interval GraphDbValueType = "interval" Timestamp GraphDbValueType = "timestamp" TimestampTz GraphDbValueType = "timestamptz" TimestampNs GraphDbValueType = "timestampns" TimestampMs GraphDbValueType = "timestampms" TimestampSec GraphDbValueType = "timestampsec" String GraphDbValueType = "string" Blob GraphDbValueType = "blob" Struct GraphDbValueType = "struct" UUID GraphDbValueType = "uuid" Decimal GraphDbValueType = "decimal" )
some types don't really make sense to be parsed in the aali flowkit context. These are not included here: - Null - InternalID - List/Array (would require somehow parsing/infering the LogicalType as well) - Struct (would require knowing type of each value) - Node/Rel/RecursiveRel - Map - Union
func (GraphDbValueType) Parse ¶ added in v1.0.3
func (valType GraphDbValueType) Parse(val string) (aali_graphdb.Value, error)
type HandlerRequest ¶
type HandlerRequest struct {
Adapter string `json:"adapter"` // "chat", "embeddings"
InstructionGuid string `json:"instructionGuid"`
ModelIds []string `json:"modelIds"` // optional model ids to define a set of specific models to be used for this request
ModelCategory []string `json:"modelCategory"` // optional model category; define one or more categories to filter models; models of the specified categories from first to last will be used for this request if available
Data interface{} `json:"data"` // for embeddings, this can be a string or []string; for chat, only string is allowed
Images []string `json:"images"` // List of images in base64 format
MCPTools []MCPTool `json:"mcpTools,omitempty"` // MCP tool definitions for tool calling support
ChatRequestType string `json:"chatRequestType"` // "summary", "code", "keywords", "general"; only relevant if "adapter" is "chat"
DataStream bool `json:"dataStream"` // only relevant if "adapter" is "chat"
MaxNumberOfKeywords uint32 `json:"maxNumberOfKeywords"` // only relevant if "chatRequestType" is "keywords"
IsConversation bool `json:"isConversation"` // only relevant if "chatRequestType" is "code"
ConversationHistory []HistoricMessage `json:"conversationHistory"` // only relevant if "isConversation" is true
GeneralContext string `json:"generalContext"` // any added context you might need
MsgContext string `json:"msgContext"` // any added context you might need
SystemPrompt interface{} `json:"systemPrompt"` // only relevant if "chatRequestType" is "general"
ModelOptions ModelOptions `json:"modelOptions,omitempty"` // only relevant if "adapter" is "chat"
EmbeddingOptions EmbeddingOptions `json:"embeddingOptions,omitempty"` // only relevant if "adapter" is "embeddings"
}
HandlerRequest represents the client request for a specific chat or embeddings operation.
type HandlerResponse ¶
type HandlerResponse struct {
// Common properties
InstructionGuid string `json:"instructionGuid"`
Type string `json:"type"` // "info", "error", "chat", "embeddings"
// Chat properties
IsLast *bool `json:"isLast,omitempty"`
Position *uint32 `json:"position,omitempty"`
InputTokenCount *int `json:"inputTokenCount,omitempty"`
OutputTokenCount *int `json:"outputTokenCount,omitempty"`
ChatData *string `json:"chatData,omitempty"`
ToolCalls []ToolCall `json:"toolCalls,omitempty"` // Structured tool calls from LLM
// Embeddings properties
EmbeddedData interface{} `json:"embeddedData,omitempty"` // []float32 or [][]float32; for BAAI/bge-m3 these are dense vectors
LexicalWeights interface{} `json:"lexicalWeights,omitempty"` // map[uint]float32 or []map[uint]float32; only for BAAI/bge-m3
ColbertVecs interface{} `json:"colbertVecs,omitempty"` // [][]float32 or [][][]float32; only for BAAI/bge-m3
// Error properties
Error *ErrorResponse `json:"error,omitempty"`
// Info properties
InfoMessage *string `json:"infoMessage,omitempty"`
}
HandlerResponse represents the LLM Handler response for a specific request.
func (*HandlerResponse) HasToolCalls ¶ added in v1.0.5
func (hr *HandlerResponse) HasToolCalls() bool
HasToolCalls returns true if the response contains tool calls.
type HistoricMessage ¶
type HistoricMessage struct {
Role string `json:"role"`
Content string `json:"content"`
Images []string `json:"images"` // image in base64 format
ToolCallId *string `json:"toolCallId,omitempty"` // Tool call ID for tool responses
ToolCalls []ToolCall `json:"toolCalls,omitempty"` // Tool calls made by assistant
}
HistoricMessage represents a past chat message.
type MCPConfig ¶ added in v1.0.5
type MCPConfig struct {
ServerURL string `json:"serverURL"` // URL of the MCP server endpoint
Transport string `json:"transport"` // Connection protocol: "stdio", "http", "websocket"
AuthToken string `json:"authToken"` // Authentication token, supports ${ENV_VAR} syntax
Timeout int `json:"timeout"` // Connection timeout in seconds
}
MCPConfig represents the configuration for MCP connections
func (*MCPConfig) GetAuthToken ¶ added in v1.0.5
GetAuthToken returns the authentication token, resolving environment variables if needed ${MCP_TOKEN} will return the value of the MCP_TOKEN environment variable
type MCPContentItem ¶ added in v1.0.5
type MCPContentItem struct {
Type string `json:"type"` // Content type: "text", "image", "resource"
Text string `json:"text,omitempty"` // Text content
Data string `json:"data,omitempty"` // Base64-encoded data for images
MimeType string `json:"mimeType,omitempty"` // MIME type for binary content
URI string `json:"uri,omitempty"` // Resource URI for resource content
}
MCPContentItem represents a single content item in an MCP response.
type MCPPrompt ¶ added in v1.0.5
type MCPPrompt struct {
Name string `json:"name"` // Unique prompt identifier
Description string `json:"description,omitempty"` // Description of what the prompt does
Arguments []MCPPromptArgument `json:"arguments,omitempty"` // Parameters the prompt accepts
}
MCPPrompt represents a prompt template available from an MCP server.
type MCPPromptArgument ¶ added in v1.0.5
type MCPPromptArgument struct {
Name string `json:"name"` // Argument name
Description string `json:"description,omitempty"` // Description of the argument
Required bool `json:"required,omitempty"` // Whether the argument is required
}
MCPPromptArgument represents an argument for a prompt template.
type MCPResource ¶ added in v1.0.5
type MCPResource struct {
URI string `json:"uri"` // Unique resource identifier
Name string `json:"name"` // Human-readable resource name
Description string `json:"description,omitempty"` // Description of the resource
MimeType string `json:"mimeType,omitempty"` // MIME type of the resource content
}
MCPResource represents a resource available from an MCP server.
type MCPTool ¶ added in v1.0.5
type MCPTool struct {
Name string `json:"name"` // Unique identifier for the tool
OriginalName string `json:"originalName,omitempty"` // Original name of the tool
Description string `json:"description,omitempty"` // Human-readable description of what the tool does
InputSchema map[string]interface{} `json:"inputSchema"` // JSON Schema for the tool's parameters
ServerURL string `json:"serverURL,omitempty"` // URL of the MCP server that provides this tool
}
MCPTool represents a tool definition in the Model Context Protocol.
type MaterialAttribute ¶ added in v1.0.3
Represents a defined material attribute with its name and GUID.
type MaterialCriterionWithGuid ¶ added in v1.0.3
type MaterialCriterionWithGuid struct {
AttributeName string `json:"attributeName"`
AttributeGuid string `json:"attributeGuid"`
Explanation string `json:"explanation"`
Confidence int `json:"confidence"`
}
Represents a criterion with its GUID
type MaterialLlmCriterion ¶ added in v1.0.3
type MaterialLlmCriterion struct {
AttributeName string `json:"attributeName"`
Explanation string `json:"explanation"`
Confidence int `json:"confidence"`
}
Represents a criterion returned from the llm
type ModelOptions ¶
type ModelOptions struct {
FrequencyPenalty *float32 `json:"frequencyPenalty,omitempty" yaml:"FREQUENCY_PENALTY,omitempty"`
MaxTokens *int32 `json:"maxTokens,omitempty" yaml:"MAX_TOKENS,omitempty"`
PresencePenalty *float32 `json:"presencePenalty,omitempty" yaml:"PRESENCE_PENALTY,omitempty"`
Stop []string `json:"stop,omitempty" yaml:"STOP,omitempty"`
Temperature *float32 `json:"temperature,omitempty" yaml:"TEMPERATURE,omitempty"`
TopP *float32 `json:"topP,omitempty" yaml:"TOP_P,omitempty"`
// Reasoning effort level
ReasoningEffort *string `json:"reasoningEffort,omitempty" yaml:"REASONING_EFFORT,omitempty"`
// Reasoning summary format
ReasoningSummary *string `json:"reasoningSummary,omitempty" yaml:"REASONING_SUMMARY,omitempty"`
Verbosity *string `json:"verbosity,omitempty" yaml:"VERBOSITY,omitempty"` // "low" | "medium" | "high"
// Extended thinking configuration (Anthropic)
ThinkingMode *string `json:"thinkingMode,omitempty" yaml:"THINKING_MODE,omitempty"` // "adaptive" | "enabled" | "disabled"
ThinkingBudgetTokens *int64 `json:"thinkingBudgetTokens,omitempty" yaml:"THINKING_BUDGET_TOKENS,omitempty"` // min 1024, must be < max_tokens
ThinkingDisplayMode *string `json:"thinkingDisplayMode,omitempty" yaml:"THINKING_DISPLAY_MODE,omitempty"` // "summarized" | "omitted"
}
ModelOptions represents options for provider-specific API calls.
type Neo4jResponse ¶
type Neo4jResponse struct {
Record neo4jRecord `json:"record"`
SummaryCounters summaryCounters `json:"summaryCounters"`
}
neo4jResponse represents the response from the Neo4j query.
type SessionContext ¶
type SessionContext struct {
WorkflowId string `json:"workflow_id,omitempty"` // Workflow ID, only relevant if "workflow_endpoint" is "custom"
Variables map[string]string `json:"variables,omitempty"` // Variables to be passed to the workflow
// Exec connection
SessionType string `json:"session_type"` // Type of session: "workflow", "exec"; default is "workflow" if not provided
ExecId string `json:"exec_id,omitempty"` // Unique identifier of connecting Exec, only relevant if "session_type" is "exec"
// Authentication
JwtToken string `json:"jwt_token"` // JWT token for authentication for "session_type" "workflow" (optional)
ApiKey string `json:"api_key"` // API key for authentication, used if "session_type" is "exec" or can be used if "session_type" is "workflow" for authentication
// Snapshot logic
SnapshotId string `json:"snapshot_id,omitempty"` // Snapshot ID, only relevant if "session_type" is "workflow"; if defined, the given snapshot will retrived from the database
WorkflowRunId string `json:"workflow_run_id,omitempty"` // Workflow run ID, only relevant if "session_type" is "workflow"; if defined, mandatory if "snapshot_id" is defined in order to retrieve the snapshot from the database
UserId string `json:"user_id,omitempty"` // User ID, only relevant if "session_type" is "workflow"; if defined, mandatory if "snapshot_id" is defined in order to retrieve the snapshot from the database
StoreSnapshots bool `json:"store_snapshots,omitempty"` // Store snapshots, only relevant if "session_type" is "workflow"; if true, all taken snapshots will be stored in the database
// Other
IpAddress string `json:"ip_address,omitempty"` // IP address of the client, required for some auth_types
}
Message represents the JSON message you are expecting
func ExtractSessionContext ¶
func ExtractSessionContext(ctx *logging.ContextMap, msg []byte) (SessionContext, error)
SetSessionContext sets the SessionContext struct from the JSON payload
Parameters:
- msg: the JSON payload
Returns:
- SessionContext: the SessionContext struct
type SlashCommand ¶ added in v1.0.5
type ToolCall ¶ added in v1.0.5
type ToolCall struct {
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Input map[string]interface{} `json:"input"`
}
ToolCall represents a tool invocation from the model.
type ToolResult ¶ added in v1.0.5
type ToolResult struct {
ToolCallID string `json:"tool_call_id"` // Matches the ID from the original tool call
Content string `json:"content"` // Primary text content
ContentItems []MCPContentItem `json:"content_items,omitempty"` // Content items for multi-modal support
IsError bool `json:"is_error"` // True if tool execution failed
}
ToolResult represents the result of a tool execution.
type TransferDetails ¶
type TransferDetails struct {
ResponseChannel chan HandlerResponse
RequestChannel chan HandlerRequest
}
TransferDetails holds communication channels for the websocket listener and writer.
type XMLMemberExample ¶
type XMLMemberExample struct {
Description string `xml:",chardata" json:"description"` // Text content of <example>
Code XMLMemberExampleCode `xml:"code,omitempty" json:"code"` // Optional <code> element
}