R/bedrockruntime_interfaces.R

Defines functions invoke_model_with_response_stream_output invoke_model_with_response_stream_input invoke_model_output invoke_model_input converse_stream_output converse_stream_input converse_output converse_input apply_guardrail_output apply_guardrail_input

# This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common populate
#' @include bedrockruntime_service.R
NULL

.bedrockruntime$apply_guardrail_input <- function(...) {
  args <- c(as.list(environment()), list(...))
  shape <- structure(list(guardrailIdentifier = structure(logical(0), tags = list(location = "uri", locationName = "guardrailIdentifier", type = "string")), guardrailVersion = structure(logical(0), tags = list(location = "uri", locationName = "guardrailVersion", type = "string")), source = structure(logical(0), tags = list(type = "string")), content = structure(list(structure(list(text = structure(list(text = structure(logical(0), tags = list(type = "string")), qualifiers = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list"))), tags = list(type = "structure"))
  return(populate(args, shape))
}

.bedrockruntime$apply_guardrail_output <- function(...) {
  args <- c(as.list(environment()), list(...))
  shape <- structure(list(usage = structure(list(topicPolicyUnits = structure(logical(0), tags = list(type = "integer", box = TRUE)), contentPolicyUnits = structure(logical(0), tags = list(type = "integer", box = TRUE)), wordPolicyUnits = structure(logical(0), tags = list(type = "integer", box = TRUE)), sensitiveInformationPolicyUnits = structure(logical(0), tags = list(type = "integer", box = TRUE)), sensitiveInformationPolicyFreeUnits = structure(logical(0), tags = list(type = "integer", box = TRUE)), contextualGroundingPolicyUnits = structure(logical(0), tags = list(type = "integer", box = TRUE))), tags = list(type = "structure")), action = structure(logical(0), tags = list(type = "string")), outputs = structure(list(structure(list(text = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), assessments = structure(list(structure(list(topicPolicy = structure(list(topics = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), contentPolicy = structure(list(filters = structure(list(structure(list(type = structure(logical(0), tags = list(type = "string")), confidence = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), wordPolicy = structure(list(customWords = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), managedWordLists = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), sensitiveInformationPolicy = structure(list(piiEntities = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), regexes = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), match = structure(logical(0), tags = list(type = "string")), regex = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), contextualGroundingPolicy = structure(list(filters = structure(list(structure(list(type = structure(logical(0), tags = list(type = "string")), threshold = structure(logical(0), tags = list(type = "double", box = TRUE)), score = structure(logical(0), tags = list(type = "double", box = TRUE)), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
  return(populate(args, shape))
}

.bedrockruntime$converse_input <- function(...) {
  args <- c(as.list(environment()), list(...))
  shape <- structure(list(modelId = structure(logical(0), tags = list(location = "uri", locationName = "modelId", type = "string")), messages = structure(list(structure(list(role = structure(logical(0), tags = list(type = "string")), content = structure(list(structure(list(text = structure(logical(0), tags = list(type = "string")), image = structure(list(format = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), document = structure(list(format = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), toolUse = structure(list(toolUseId = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), input = structure(list(), tags = list(type = "structure", document = TRUE))), tags = list(type = "structure")), toolResult = structure(list(toolUseId = structure(logical(0), tags = list(type = "string")), content = structure(list(structure(list(json = structure(list(), tags = list(type = "structure", document = TRUE)), text = structure(logical(0), tags = list(type = "string")), image = structure(list(format = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), document = structure(list(format = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list")), status = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), guardContent = structure(list(text = structure(list(text = structure(logical(0), tags = list(type = "string")), qualifiers = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list")), system = structure(list(structure(list(text = structure(logical(0), tags = list(type = "string")), guardContent = structure(list(text = structure(list(text = structure(logical(0), tags = list(type = "string")), qualifiers = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list")), inferenceConfig = structure(list(maxTokens = structure(logical(0), tags = list(type = "integer", box = TRUE)), temperature = structure(logical(0), tags = list(type = "float", box = TRUE)), topP = structure(logical(0), tags = list(type = "float", box = TRUE)), stopSequences = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), toolConfig = structure(list(tools = structure(list(structure(list(toolSpec = structure(list(name = structure(logical(0), tags = list(type = "string")), description = structure(logical(0), tags = list(type = "string")), inputSchema = structure(list(json = structure(list(), tags = list(type = "structure", document = TRUE))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list")), toolChoice = structure(list(auto = structure(list(), tags = list(type = "structure")), any = structure(list(), tags = list(type = "structure")), tool = structure(list(name = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), guardrailConfig = structure(list(guardrailIdentifier = structure(logical(0), tags = list(type = "string")), guardrailVersion = structure(logical(0), tags = list(type = "string")), trace = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), additionalModelRequestFields = structure(list(), tags = list(type = "structure", document = TRUE)), additionalModelResponseFieldPaths = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
  return(populate(args, shape))
}

.bedrockruntime$converse_output <- function(...) {
  args <- c(as.list(environment()), list(...))
  shape <- structure(list(output = structure(list(message = structure(list(role = structure(logical(0), tags = list(type = "string")), content = structure(list(structure(list(text = structure(logical(0), tags = list(type = "string")), image = structure(list(format = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), document = structure(list(format = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), toolUse = structure(list(toolUseId = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), input = structure(list(), tags = list(type = "structure", document = TRUE))), tags = list(type = "structure")), toolResult = structure(list(toolUseId = structure(logical(0), tags = list(type = "string")), content = structure(list(structure(list(json = structure(list(), tags = list(type = "structure", document = TRUE)), text = structure(logical(0), tags = list(type = "string")), image = structure(list(format = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), document = structure(list(format = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list")), status = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), guardContent = structure(list(text = structure(list(text = structure(logical(0), tags = list(type = "string")), qualifiers = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE)), stopReason = structure(logical(0), tags = list(type = "string")), usage = structure(list(inputTokens = structure(logical(0), tags = list(type = "integer", box = TRUE)), outputTokens = structure(logical(0), tags = list(type = "integer", box = TRUE)), totalTokens = structure(logical(0), tags = list(type = "integer", box = TRUE))), tags = list(type = "structure")), metrics = structure(list(latencyMs = structure(logical(0), tags = list(type = "long", box = TRUE))), tags = list(type = "structure")), additionalModelResponseFields = structure(list(), tags = list(type = "structure", document = TRUE)), trace = structure(list(guardrail = structure(list(modelOutput = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), inputAssessment = structure(list(structure(list(topicPolicy = structure(list(topics = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), contentPolicy = structure(list(filters = structure(list(structure(list(type = structure(logical(0), tags = list(type = "string")), confidence = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), wordPolicy = structure(list(customWords = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), managedWordLists = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), sensitiveInformationPolicy = structure(list(piiEntities = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), regexes = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), match = structure(logical(0), tags = list(type = "string")), regex = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), contextualGroundingPolicy = structure(list(filters = structure(list(structure(list(type = structure(logical(0), tags = list(type = "string")), threshold = structure(logical(0), tags = list(type = "double", box = TRUE)), score = structure(logical(0), tags = list(type = "double", box = TRUE)), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "map")), outputAssessments = structure(list(structure(list(structure(list(topicPolicy = structure(list(topics = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), contentPolicy = structure(list(filters = structure(list(structure(list(type = structure(logical(0), tags = list(type = "string")), confidence = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), wordPolicy = structure(list(customWords = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), managedWordLists = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), sensitiveInformationPolicy = structure(list(piiEntities = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), regexes = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), match = structure(logical(0), tags = list(type = "string")), regex = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), contextualGroundingPolicy = structure(list(filters = structure(list(structure(list(type = structure(logical(0), tags = list(type = "string")), threshold = structure(logical(0), tags = list(type = "double", box = TRUE)), score = structure(logical(0), tags = list(type = "double", box = TRUE)), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "structure"))
  return(populate(args, shape))
}

.bedrockruntime$converse_stream_input <- function(...) {
  args <- c(as.list(environment()), list(...))
  shape <- structure(list(modelId = structure(logical(0), tags = list(location = "uri", locationName = "modelId", type = "string")), messages = structure(list(structure(list(role = structure(logical(0), tags = list(type = "string")), content = structure(list(structure(list(text = structure(logical(0), tags = list(type = "string")), image = structure(list(format = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), document = structure(list(format = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), toolUse = structure(list(toolUseId = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), input = structure(list(), tags = list(type = "structure", document = TRUE))), tags = list(type = "structure")), toolResult = structure(list(toolUseId = structure(logical(0), tags = list(type = "string")), content = structure(list(structure(list(json = structure(list(), tags = list(type = "structure", document = TRUE)), text = structure(logical(0), tags = list(type = "string")), image = structure(list(format = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), document = structure(list(format = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), source = structure(list(bytes = structure(logical(0), tags = list(type = "blob"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list")), status = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), guardContent = structure(list(text = structure(list(text = structure(logical(0), tags = list(type = "string")), qualifiers = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list")), system = structure(list(structure(list(text = structure(logical(0), tags = list(type = "string")), guardContent = structure(list(text = structure(list(text = structure(logical(0), tags = list(type = "string")), qualifiers = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list")), inferenceConfig = structure(list(maxTokens = structure(logical(0), tags = list(type = "integer", box = TRUE)), temperature = structure(logical(0), tags = list(type = "float", box = TRUE)), topP = structure(logical(0), tags = list(type = "float", box = TRUE)), stopSequences = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), toolConfig = structure(list(tools = structure(list(structure(list(toolSpec = structure(list(name = structure(logical(0), tags = list(type = "string")), description = structure(logical(0), tags = list(type = "string")), inputSchema = structure(list(json = structure(list(), tags = list(type = "structure", document = TRUE))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "list")), toolChoice = structure(list(auto = structure(list(), tags = list(type = "structure")), any = structure(list(), tags = list(type = "structure")), tool = structure(list(name = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE))), tags = list(type = "structure")), guardrailConfig = structure(list(guardrailIdentifier = structure(logical(0), tags = list(type = "string")), guardrailVersion = structure(logical(0), tags = list(type = "string")), trace = structure(logical(0), tags = list(type = "string")), streamProcessingMode = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), additionalModelRequestFields = structure(list(), tags = list(type = "structure", document = TRUE)), additionalModelResponseFieldPaths = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
  return(populate(args, shape))
}

.bedrockruntime$converse_stream_output <- function(...) {
  args <- c(as.list(environment()), list(...))
  shape <- structure(list(stream = structure(list(messageStart = structure(list(role = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", event = TRUE)), contentBlockStart = structure(list(start = structure(list(toolUse = structure(list(toolUseId = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE)), contentBlockIndex = structure(logical(0), tags = list(type = "integer", box = TRUE))), tags = list(type = "structure", event = TRUE)), contentBlockDelta = structure(list(delta = structure(list(text = structure(logical(0), tags = list(type = "string")), toolUse = structure(list(input = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure", union = TRUE)), contentBlockIndex = structure(logical(0), tags = list(type = "integer", box = TRUE))), tags = list(type = "structure", event = TRUE)), contentBlockStop = structure(list(contentBlockIndex = structure(logical(0), tags = list(type = "integer", box = TRUE))), tags = list(type = "structure", event = TRUE)), messageStop = structure(list(stopReason = structure(logical(0), tags = list(type = "string")), additionalModelResponseFields = structure(list(), tags = list(type = "structure", document = TRUE))), tags = list(type = "structure", event = TRUE)), metadata = structure(list(usage = structure(list(inputTokens = structure(logical(0), tags = list(type = "integer", box = TRUE)), outputTokens = structure(logical(0), tags = list(type = "integer", box = TRUE)), totalTokens = structure(logical(0), tags = list(type = "integer", box = TRUE))), tags = list(type = "structure")), metrics = structure(list(latencyMs = structure(logical(0), tags = list(type = "long", box = TRUE))), tags = list(type = "structure")), trace = structure(list(guardrail = structure(list(modelOutput = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), inputAssessment = structure(list(structure(list(topicPolicy = structure(list(topics = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), contentPolicy = structure(list(filters = structure(list(structure(list(type = structure(logical(0), tags = list(type = "string")), confidence = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), wordPolicy = structure(list(customWords = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), managedWordLists = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), sensitiveInformationPolicy = structure(list(piiEntities = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), regexes = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), match = structure(logical(0), tags = list(type = "string")), regex = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), contextualGroundingPolicy = structure(list(filters = structure(list(structure(list(type = structure(logical(0), tags = list(type = "string")), threshold = structure(logical(0), tags = list(type = "double", box = TRUE)), score = structure(logical(0), tags = list(type = "double", box = TRUE)), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "map")), outputAssessments = structure(list(structure(list(structure(list(topicPolicy = structure(list(topics = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), contentPolicy = structure(list(filters = structure(list(structure(list(type = structure(logical(0), tags = list(type = "string")), confidence = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), wordPolicy = structure(list(customWords = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), managedWordLists = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), sensitiveInformationPolicy = structure(list(piiEntities = structure(list(structure(list(match = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), regexes = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), match = structure(logical(0), tags = list(type = "string")), regex = structure(logical(0), tags = list(type = "string")), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), contextualGroundingPolicy = structure(list(filters = structure(list(structure(list(type = structure(logical(0), tags = list(type = "string")), threshold = structure(logical(0), tags = list(type = "double", box = TRUE)), score = structure(logical(0), tags = list(type = "double", box = TRUE)), action = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "structure", event = TRUE)), internalServerException = structure(list(message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE, fault = TRUE)), modelStreamErrorException = structure(list(message = structure(logical(0), tags = list(type = "string")), originalStatusCode = structure(logical(0), tags = list(type = "integer", box = TRUE)), originalMessage = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE)), validationException = structure(list(message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE)), throttlingException = structure(list(message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE)), serviceUnavailableException = structure(list(message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE, fault = TRUE))), tags = list(type = "structure", eventstream = TRUE))), tags = list(type = "structure", payload = "stream"))
  return(populate(args, shape))
}

.bedrockruntime$invoke_model_input <- function(...) {
  args <- c(as.list(environment()), list(...))
  shape <- structure(list(body = structure(logical(0), tags = list(type = "blob", sensitive = TRUE)), contentType = structure(logical(0), tags = list(location = "header", locationName = "Content-Type", type = "string")), accept = structure(logical(0), tags = list(location = "header", locationName = "Accept", type = "string")), modelId = structure(logical(0), tags = list(location = "uri", locationName = "modelId", type = "string")), trace = structure(logical(0), tags = list(location = "header", locationName = "X-Amzn-Bedrock-Trace", type = "string")), guardrailIdentifier = structure(logical(0), tags = list(location = "header", locationName = "X-Amzn-Bedrock-GuardrailIdentifier", type = "string")), guardrailVersion = structure(logical(0), tags = list(location = "header", locationName = "X-Amzn-Bedrock-GuardrailVersion", type = "string"))), tags = list(type = "structure", payload = "body"))
  return(populate(args, shape))
}

.bedrockruntime$invoke_model_output <- function(...) {
  args <- c(as.list(environment()), list(...))
  shape <- structure(list(body = structure(logical(0), tags = list(type = "blob", sensitive = TRUE)), contentType = structure(logical(0), tags = list(location = "header", locationName = "Content-Type", type = "string"))), tags = list(type = "structure", payload = "body"))
  return(populate(args, shape))
}

.bedrockruntime$invoke_model_with_response_stream_input <- function(...) {
  args <- c(as.list(environment()), list(...))
  shape <- structure(list(body = structure(logical(0), tags = list(type = "blob", sensitive = TRUE)), contentType = structure(logical(0), tags = list(location = "header", locationName = "Content-Type", type = "string")), accept = structure(logical(0), tags = list(location = "header", locationName = "X-Amzn-Bedrock-Accept", type = "string")), modelId = structure(logical(0), tags = list(location = "uri", locationName = "modelId", type = "string")), trace = structure(logical(0), tags = list(location = "header", locationName = "X-Amzn-Bedrock-Trace", type = "string")), guardrailIdentifier = structure(logical(0), tags = list(location = "header", locationName = "X-Amzn-Bedrock-GuardrailIdentifier", type = "string")), guardrailVersion = structure(logical(0), tags = list(location = "header", locationName = "X-Amzn-Bedrock-GuardrailVersion", type = "string"))), tags = list(type = "structure", payload = "body"))
  return(populate(args, shape))
}

.bedrockruntime$invoke_model_with_response_stream_output <- function(...) {
  args <- c(as.list(environment()), list(...))
  shape <- structure(list(body = structure(list(chunk = structure(list(bytes = structure(logical(0), tags = list(type = "blob", sensitive = TRUE))), tags = list(type = "structure", event = TRUE, sensitive = TRUE)), internalServerException = structure(list(message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE, fault = TRUE)), modelStreamErrorException = structure(list(message = structure(logical(0), tags = list(type = "string")), originalStatusCode = structure(logical(0), tags = list(type = "integer", box = TRUE)), originalMessage = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE)), validationException = structure(list(message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE)), throttlingException = structure(list(message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE)), modelTimeoutException = structure(list(message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE)), serviceUnavailableException = structure(list(message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure", exception = TRUE, fault = TRUE))), tags = list(type = "structure", eventstream = TRUE)), contentType = structure(logical(0), tags = list(location = "header", locationName = "X-Amzn-Bedrock-Content-Type", type = "string"))), tags = list(type = "structure", payload = "body"))
  return(populate(args, shape))
}

Try the paws.machine.learning package in your browser

Any scripts or data that you put into this service are public.

paws.machine.learning documentation built on Sept. 12, 2024, 6:23 a.m.