aide/effect

Types

pub type CompleteArgument {
  CompleteArgument(name: String, value: String)
}

Constructors

  • CompleteArgument(name: String, value: String)
pub type CompletionReference {
  PromptReference(name: String, title: option.Option(String))
  ResourceTemplateReference(uri: String)
}

Constructors

  • PromptReference(name: String, title: option.Option(String))
  • ResourceTemplateReference(uri: String)
pub type Effect(return, tool, prompt) {
  Done(message: return)
  CallTool(
    tool: tool,
    resume: fn(Result(dict.Dict(String, utils.Any), String)) -> return,
  )
  ReadResource(
    resource: definitions.Resource,
    resume: fn(ResourceContents) -> return,
  )
  GetPrompt(
    prompt: prompt,
    resume: fn(List(definitions.PromptMessage)) -> return,
  )
  Complete(
    ref: CompletionReference,
    argument: CompleteArgument,
    context: dict.Dict(String, String),
    resume: fn(List(String)) -> return,
  )
}

Constructors

pub type ResourceContents {
  TextContents(mime_type: String, text: String)
  BlobContents(mime_type: String, blob: BitArray)
}

Constructors

  • TextContents(mime_type: String, text: String)
  • BlobContents(mime_type: String, blob: BitArray)

Values

pub fn resource_contents_to_result(
  uri: String,
  contents: ResourceContents,
) -> definitions.ReadResourceResult
Search Document