Documentation
¶
Index ¶
- type AllowanceRes
- type AmountReq
- type BalanceRes
- type Bid
- type BidRes
- type BidsRes
- type BlockRes
- type BudgetRes
- type ContractInteraction
- type CreateBidRequest
- type CreateModelRequest
- type CreateProviderRequest
- type ErrRes
- type InputEntry
- type MappedTransaction
- type Model
- type ModelRes
- type ModelType
- type ModelsRes
- type OpenSessionRequest
- type OpenSessionRes
- type OpenSessionWithDurationRequest
- type OpenSessionWithFailover
- type PathEthAddrID
- type PathHex32ID
- type Provider
- type ProviderRes
- type ProvidersRes
- type QueryApprove
- type QueryOffsetLimitOrder
- type QueryOffsetLimitOrderNoDefault
- type QueryPageLimit
- type QueryProvider
- type QuerySpender
- type QueryUser
- type RawEthTransactionResponse
- type RawTransaction
- type ScoredBid
- type ScoredBidsRes
- type SendRequest
- type Session
- type SessionRes
- type SessionsRes
- type SupplyRes
- type TokenBalanceRes
- type TokenTransfer
- type TransactionsRes
- type TxRes
- type TxType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowanceRes ¶
type BalanceRes ¶
type ContractInteraction ¶
type ContractInteraction struct { ContractAddress common.Address `json:"contractAddress"` ContractName string `json:"contractName"` MethodName string `json:"methodName"` DecodedInput []InputEntry `json:"decodedInput"` }
type CreateBidRequest ¶
type CreateModelRequest ¶
type CreateModelRequest struct { ID string `json:"id" binding:"omitempty" validate:"hex32" example:"0x1234"` IpfsID string `json:"ipfsID" binding:"required" validate:"hex32" example:"0x1234"` Fee *lib.BigInt `json:"fee" binding:"required" validate:"number" example:"123000000000" swaggertype:"integer"` Stake *lib.BigInt `json:"stake" binding:"required" validate:"number" example:"123000000000" swaggertype:"integer"` Name string `json:"name" binding:"required" validate:"min=1,max=64" example:"Llama 2.0"` Tags []string `json:"tags" binding:"required" validate:"min=1,max=64,dive,min=1,max=64" example:"LLM"` }
type CreateProviderRequest ¶
type InputEntry ¶
type MappedTransaction ¶
type MappedTransaction struct { Hash common.Hash `json:"hash"` From common.Address `json:"from"` To common.Address `json:"to"` Contract *ContractInteraction `json:"contract"` Transfers []TokenTransfer `json:"transfers"` Timestamp string `json:"timestamp"` }
type Model ¶
type Model struct { Id common.Hash IpfsCID common.Hash Fee *big.Int `swaggertype:"integer"` Stake *big.Int `swaggertype:"integer"` Owner common.Address Name string Tags []string CreatedAt *big.Int `swaggertype:"integer"` IsDeleted bool ModelType ModelType // Type of the model (LLM, STT, TTS, EMBEDDING) }
type ModelType ¶
type ModelType string
ModelType is "LLM" or "STT" or "TTS" or "EMBEDDING" ModelType represents the type of model, such as LLM (Large Language Model), STT (Speech-to-Text), TTS (Text-to-Speech), or EMBEDDING. It is used to categorize models based on their functionality.
type OpenSessionRequest ¶
type OpenSessionRequest struct { Approval lib.HexString `json:"approval" binding:"required" validate:"hexadecimal" format:"hex" example:"0x1234" swaggertype:"string"` ApprovalSig lib.HexString `json:"approvalSig" binding:"required" validate:"hexadecimal" format:"hex" example:"0x1234" swaggertype:"string"` Stake *lib.BigInt `json:"stake" binding:"required" validate:"number,gt=0" example:"123000000000" swaggertype:"integer"` DirectPayment bool `json:"directPayment" binding:"omitempty"` }
type OpenSessionRes ¶
type OpenSessionWithFailover ¶
type PathEthAddrID ¶
type PathHex32ID ¶
type ProviderRes ¶
type ProviderRes struct {
Provider *Provider `json:"provider"`
}
type ProvidersRes ¶
type ProvidersRes struct {
Providers []*Provider `json:"providers"`
}
type QueryApprove ¶
type QueryApprove struct { *QuerySpender Amount *lib.BigInt `form:"amount" binding:"required" validate:"number,gt=0" swaggertype:"integer"` }
type QueryOffsetLimitOrder ¶
type QueryOffsetLimitOrder struct { Offset lib.BigInt `form:"offset,default=0" binding:"omitempty" validate:"number,gte=0" example:"0" swaggertype:"integer"` Limit uint8 `form:"limit,default=10" binding:"omitempty" validate:"number,gte=1" example:"10"` Order string `form:"order,default=asc" binding:"omitempty" validate:"oneof=asc desc" example:"asc"` }
type QueryOffsetLimitOrderNoDefault ¶
type QueryOffsetLimitOrderNoDefault struct { Offset lib.BigInt `form:"offset,default=0" binding:"omitempty" validate:"number,gte=0" example:"0" swaggertype:"integer"` Limit uint8 `form:"limit,default=0" binding:"omitempty" validate:"number,gte=1" example:"10"` Order string `form:"order,default=asc" binding:"omitempty" validate:"oneof=asc desc" example:"asc"` }
type QueryPageLimit ¶
type QueryProvider ¶
type QuerySpender ¶
type RawEthTransactionResponse ¶
type RawEthTransactionResponse struct { Status string `json:"status"` Message string `json:"message"` Result json.RawMessage `json:"result"` }
type RawTransaction ¶
type RawTransaction struct { BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` Confirmations string `json:"confirmations"` ContractAddress string `json:"contractAddress"` CumulativeGasUsed string `json:"cumulativeGasUsed"` From string `json:"from"` FunctionName string `json:"functionName"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` GasPriceBid string `json:"gasPriceBid"` GasUsed string `json:"gasUsed"` Hash string `json:"hash"` Input string `json:"input"` IsError string `json:"isError"` MethodId string `json:"methodId"` Nonce string `json:"nonce"` TimeStamp string `json:"timeStamp"` To string `json:"to"` TransactionIndex string `json:"transactionIndex"` TxReceiptStatus string `json:"txreceipt_status"` Value string `json:"value"` }
type ScoredBidsRes ¶
type ScoredBidsRes struct {
Bids []ScoredBid `json:"bids"`
}
type SendRequest ¶
type Session ¶
type Session struct { Id string User common.Address Provider common.Address ModelAgentId string BidID string Stake *big.Int `swaggertype:"integer"` PricePerSecond *big.Int `swaggertype:"integer"` CloseoutReceipt string CloseoutType *big.Int `swaggertype:"integer"` ProviderWithdrawnAmount *big.Int `swaggertype:"integer"` OpenedAt *big.Int `swaggertype:"integer"` EndsAt *big.Int `swaggertype:"integer"` ClosedAt *big.Int `swaggertype:"integer"` }
type SessionRes ¶
type SessionRes struct {
Session *Session `json:"session"`
}
type SessionsRes ¶
type SessionsRes struct {
Sessions []*Session `json:"sessions"`
}
type TokenBalanceRes ¶
type TokenTransfer ¶
type TokenTransfer struct { From common.Address `json:"from"` To common.Address `json:"to"` Value string `json:"value"` TokenAddress *common.Address `json:"tokenAddress"` // nil for eth transfers TokenSymbol string `json:"tokenSymbol"` TokenName string `json:"tokenName"` TokenIcon string `json:"tokenIcon"` TokenDecimals int `json:"tokenDecimals"` }
type TransactionsRes ¶
type TransactionsRes struct {
Transactions []MappedTransaction `json:"transactions"`
}
Click to show internal directories.
Click to hide internal directories.