spin
Version:
sha256:99b72dd
world platform
imports
world http-trigger
imports
exports
world platform-rc20231018
imports
world http-trigger-rc20231018
imports
exports
key-value interface
store:resource {
}
error:variant {
store-table-full
no-such-store
access-denied
other(string)
}llm interface
inferencing-model:string
inferencing-params:record {
max-tokens: u32
repeat-penalty: f32
repeat-penalty-last-n-token-count: u32
temperature: f32
top-k: u32
top-p: f32
}error:variant {
model-not-supported
runtime-error(string)
invalid-input(string)
}inferencing-usage:record {
prompt-token-count: u32
generated-token-count: u32
}embedding-model:string
embeddings-usage:record {
prompt-token-count: u32
}infer(model:inferencing-model, prompt:string, params:option<inferencing-params>) → result<inferencing-result, error>
mqtt interface
error:variant {
invalid-address
too-many-connections
connection-failed(string)
other(string)
}qos:enum {
at-most-once
at-least-once
exactly-once
}connection:resource {
staticopen(address:string, username:string, password:string, keep-alive-interval-in-secs:u64) → result<connection, error>
}payload:list<u8>
rdbms-types interface
error:variant {
connection-failed(string)
bad-parameter(string)
query-failed(string)
value-conversion-failed(string)
other(string)
}db-data-type:enum {
boolean
int8
int16
int32
int64
uint8
uint16
uint32
uint64
floating32
floating64
str
binary
other
}db-value:variant {
boolean(bool)
int8(s8)
int16(s16)
int32(s32)
int64(s64)
uint8(u8)
uint16(u16)
uint32(u32)
uint64(u64)
floating32(f32)
floating64(f64)
str(string)
binary(list<u8>)
db-null
unsupported
}parameter-value:variant {
boolean(bool)
int8(s8)
int16(s16)
int32(s32)
int64(s64)
uint8(u8)
uint16(u16)
uint32(u32)
uint64(u64)
floating32(f32)
floating64(f64)
str(string)
binary(list<u8>)
db-null
}row:list<db-value>
mysql interface
Imported Types
fermyon:spin/rdbms-types.{parameter-value}
fermyon:spin/rdbms-types.{row-set}
fermyon:spin/rdbms-types.{error}
connection:resource {
}
postgres interface
Imported Types
fermyon:spin/rdbms-types.{parameter-value}
fermyon:spin/rdbms-types.{row-set}
fermyon:spin/rdbms-types.{error}
connection:resource {
}
redis interface
error:variant {
invalid-address
too-many-connections
type-error
other(string)
}connection:resource {}
payload:list<u8>
sqlite interface
connection:resource {
}
error:variant {
no-such-database
access-denied
invalid-connection
database-full
io(string)
}value:variant {
integer(s64)
real(f64)
text(string)
blob(list<u8>)
null
}row-result:record {
values: list<value>
}variables interface
error:variant {
invalid-name(string)
undefined(string)
provider(string)
other(string)
}