@qverisai/sdk
TypeScript SDK API 参考
本页根据 package 公开导出和源码注释自动生成。安装、认证与完整工作流请参阅 TypeScript SDK 指南。
类#
ApiKeyCredentialProvider#
A credential provider backed by a static QVeris API key.
实现#
构造函数#
构造函数#
new ApiKeyCredentialProvider(
apiKey):ApiKeyCredentialProvider
参数#
apiKey#
string
返回#
方法#
getCredential()#
getCredential(
_context):Promise<string>
参数#
_context#
返回#
Promise<string>
实现了#
CredentialProvider.getCredential
Qveris#
QVeris API client.
示例#
import { Qveris } from '@qverisai/sdk';
const qveris = new Qveris({ apiKey: process.env.QVERIS_API_KEY! });
const found = await qveris.discover('stock price market data API', { limit: 5 });
const tool = found.results[0];
const outcome = await qveris.call(tool.tool_id, {
searchId: found.search_id,
parameters: { symbol: 'AAPL' },
});构造函数#
构造函数#
new Qveris(
config):Qveris
参数#
config#
返回#
访问器#
rateLimitRetryCount#
Getter 签名#
get rateLimitRetryCount():
number
How many times the client has backed off on a rate-limited (429) / transient (503) response so far. Rate-limit backoff is retried pressure, not failure — observe this rather than counting the retried responses.
返回#
number
方法#
call()#
call(
toolId,options):Promise<ExecuteResponse>
Call a capability. The response may include pre-settlement billing; final charges are reflected in usage() and ledger().
参数#
toolId#
string
options#
返回#
Promise<ExecuteResponse>
credits()#
credits():
Promise<CreditsResponse>
Get current credit balance and bucket details.
返回#
Promise<CreditsResponse>
discover()#
discover(
query,options?):Promise<SearchResponse>
Discover capabilities from a natural-language query. Free.
参数#
query#
string
options?#
DiscoverOptions = {}
返回#
Promise<SearchResponse>
inspect()#
inspect(
toolIds,options?):Promise<SearchResponse>
Inspect capabilities by id to get current parameter schemas. Free. An empty id list resolves locally without a network request.
参数#
toolIds#
string | string[]
options?#
InspectOptions = {}
返回#
Promise<SearchResponse>
ledger()#
ledger(
filters?):Promise<CreditsLedgerResponse>
Query final credits ledger entries.
参数#
filters?#
CreditsLedgerRequest = {}
返回#
Promise<CreditsLedgerResponse>
probe()#
probe(
toolId,options?):Promise<ProbeResponse>
Validate candidate parameters and request a zero-cost quote without executing the capability.
参数#
toolId#
string
options?#
ProbeOptions = {}
返回#
Promise<ProbeResponse>
usage()#
usage(
filters?):Promise<UsageEventsResponse>
Query request-level usage audit history.
参数#
filters?#
UsageHistoryRequest = {}
返回#
Promise<UsageEventsResponse>
fromEnv()#
staticfromEnv(overrides?):Qveris
Create a client from the QVERIS_API_KEY environment variable. An explicit baseUrl override takes priority over QVERIS_BASE_URL.
参数#
overrides?#
Omit<QverisClientOptions, "apiKey" | "credentialProvider">
返回#
QverisApiError#
Error thrown for any failed QVeris API interaction: HTTP errors, failure envelopes, timeouts, and network failures.
Carries the same shape as the wire-level ApiError so callers can
branch on status and inspect observability for diagnostics.
继承#
Error
实现#
构造函数#
构造函数#
new QverisApiError(
error):QverisApiError
参数#
error#
返回#
重写了#
Error.constructor
属性#
cause?#
readonlyoptionalcause?:string
Lower-level transport or runtime cause when available
实现了#
重写了#
Error.cause
details?#
readonlyoptionaldetails?:unknown
Original error details if available
实现了#
message#
message:
string
Error message
实现了#
继承自#
Error.message
name#
name:
string
继承自#
Error.name
observability?#
readonlyoptionalobservability?:ApiObservability
Request metadata for diagnosing API failures
实现了#
stack?#
optionalstack?:string
继承自#
Error.stack
status#
readonlystatus:number
HTTP status code (0 for network errors, 408 for timeouts)
实现了#
stackTraceLimit#
staticstackTraceLimit:number
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
继承自#
Error.stackTraceLimit
方法#
captureStackTrace()#
staticcaptureStackTrace(targetObject,constructorOpt?):void
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();参数#
targetObject#
object
constructorOpt?#
Function
返回#
void
继承自#
Error.captureStackTrace
prepareStackTrace()#
staticprepareStackTrace(err,stackTraces):any
参数#
err#
Error
stackTraces#
CallSite[]
返回#
any
参阅#
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
继承自#
Error.prepareStackTrace
接口#
ApiEnvelope#
类型参数#
T#
T
属性#
data#
data:
T
message?#
optionalmessage?:string
status#
status:
string
status_code?#
optionalstatus_code?:number
ApiError#
属性#
cause?#
optionalcause?:string
Lower-level transport or runtime cause when available.
details?#
optionaldetails?:unknown
Original error details if available
message#
message:
string
Error message
observability?#
optionalobservability?:ApiObservability
Request metadata for diagnosing API/provider/tool-chain failures.
status#
status:
number
HTTP status code
ApiObservability#
属性#
endpoint#
endpoint:
string
error_type?#
optionalerror_type?:ApiErrorType
http_status?#
optionalhttp_status?:number
method#
method:
"GET"|"POST"
operation#
operation:
ApiOperation
query_params?#
optionalquery_params?:Record<string,string>
request_id?#
optionalrequest_id?:string
source#
source:
"qveris_api"
timeout_ms#
timeout_ms:
number
url#
url:
string
BillingChargeLine#
属性#
amount_credits?#
optionalamount_credits?:number|null
component_key#
component_key:
string
description?#
optionaldescription?:string|null
is_adjustment?#
optionalis_adjustment?:boolean|null
price?#
optionalprice?:BillingPrice|null
quantity?#
optionalquantity?:number|null
unit?#
optionalunit?:string|null
unit_label?#
optionalunit_label?:string|null
BillingPrice#
属性#
amount_credits#
amount_credits:
number
per?#
optionalper?:number|null
unit?#
optionalunit?:string|null
unit_label?#
optionalunit_label?:string|null
BillingRule#
属性#
billing_unit?#
optionalbilling_unit?:string
billing_unit_label?#
optionalbilling_unit_label?:string
description?#
optionaldescription?:string
metering_mode?#
optionalmetering_mode?:string
minimum_charge_credits?#
optionalminimum_charge_credits?:number|null
price?#
optionalprice?:BillingPrice|null
price_breakdown?#
optionalprice_breakdown?:Record<string,unknown>[] |null
pricing_dimensions?#
optionalpricing_dimensions?:Record<string,unknown>[] |null
pricing_source_system?#
optionalpricing_source_system?:string|null
runtime_pricing_version?#
optionalruntime_pricing_version?:string|null
snapshot_id?#
optionalsnapshot_id?:number|null
snapshot_version?#
optionalsnapshot_version?:string|null
CallOptions#
Options for Qveris.call.
属性#
maxResponseSize?#
optionalmaxResponseSize?:number
Max response bytes before truncation (-1 for no limit, server default 20480)
parameters#
parameters:
Record<string,unknown>
Key-value parameters matching the tool's parameter schema
respondWith?#
optionalrespondWith?:"full"|`fields:${string}`|"summary"
Server-side result projection. Omit for the legacy/full response.
searchId?#
optionalsearchId?:string
The search_id from the discover call that returned this tool
sessionId?#
optionalsessionId?:string
Session identifier for tracking
timeoutMs?#
optionaltimeoutMs?:number
Per-request timeout override in milliseconds (default 120s)
CompactBillingStatement#
属性#
charge_lines?#
optionalcharge_lines?:BillingChargeLine[] |null
list_amount_credits?#
optionallist_amount_credits?:number|null
minimum_charge_credits?#
optionalminimum_charge_credits?:number|null
price?#
optionalprice?:BillingPrice|null
quantity?#
optionalquantity?:number|null
requested_amount_credits?#
optionalrequested_amount_credits?:number|null
summary?#
optionalsummary?:string|null
CredentialContext#
Context supplied whenever the client requests a credential.
属性#
resource#
resource:
string
API resource the credential will be sent to.
scopes#
scopes: readonly
string[]
Requested authorization scopes. Empty until a public scope contract is available.
CredentialProvider#
Supplies a bearer credential for an API request.
方法#
getCredential()#
getCredential(
context):string|Promise<string>
参数#
context#
返回#
string | Promise<string>
CreditsLedgerItem#
属性#
amount_credits#
amount_credits:
number
balance_after?#
optionalbalance_after?:Record<string,unknown> |null
balance_before?#
optionalbalance_before?:Record<string,unknown> |null
created_at#
created_at:
string
description?#
optionaldescription?:string|null
entry_type#
entry_type:
string
id#
id:
string
ledger_metadata?#
optionalledger_metadata?:Record<string,unknown> |null
pre_settlement_bill?#
optionalpre_settlement_bill?:Record<string,unknown> |null
settlement_result?#
optionalsettlement_result?:Record<string,unknown> |null
source_ref_id?#
optionalsource_ref_id?:string|null
source_ref_type?#
optionalsource_ref_type?:string|null
source_system#
source_system:
string
CreditsLedgerRequest#
属性#
bucket?#
optionalbucket?:string
direction?#
optionaldirection?:string
end_date?#
optionalend_date?:string
entry_type?#
optionalentry_type?:string
limit?#
optionallimit?:number
max_credits?#
optionalmax_credits?:number
min_credits?#
optionalmin_credits?:number
page?#
optionalpage?:number
page_size?#
optionalpage_size?:number
start_date?#
optionalstart_date?:string
summary?#
optionalsummary?:boolean
CreditsLedgerResponse#
属性#
items#
items:
CreditsLedgerItem[]
page#
page:
number
page_size#
page_size:
number
summary?#
optionalsummary?:Record<string,unknown> |null
total#
total:
number
CreditsResponse#
属性#
daily_free?#
optionaldaily_free?:Record<string,unknown>
invite_reward?#
optionalinvite_reward?:Record<string,unknown>
purchased?#
optionalpurchased?:Record<string,unknown>
remaining_credits#
remaining_credits:
number
welcome_bonus?#
optionalwelcome_bonus?:Record<string,unknown>
DiscoverOptions#
Options for Qveris.discover.
属性#
lang?#
optionallang?:"zh"|"en"
Response language. Omit to use server-side language negotiation.
limit?#
optionallimit?:number
Maximum number of results (1-100, server default 20)
sessionId?#
optionalsessionId?:string
Session identifier for tracking
timeoutMs?#
optionaltimeoutMs?:number
Per-request timeout override in milliseconds
view?#
optionalview?:"routing"|"full"
Response projection. Omit for the legacy/full response shape.
ExecuteRequest#
Request body for the Execute Tool API.
属性#
max_response_size?#
optionalmax_response_size?:number
Maximum size of response data in bytes.
If the tool generates data longer than this, it will be truncated
and a download URL will be provided for the full content.
Minimum: -1 (-1 means no limit).
默认值#
20480 (20KB)parameters#
parameters:
Record<string,unknown>
Key-value pairs of parameters to pass to the tool. Must match the parameter schema from the tool's definition.
respond_with?#
optionalrespond_with?:"full"|`fields:${string}`|"summary"
Server-side result projection. Omit for the legacy/full response.
search_id#
search_id:
string
The search_id from the search that returned this tool. Links the execution to the original search for analytics and billing.
session_id?#
optionalsession_id?:string
Session identifier for tracking user sessions.
ExecuteResponse#
Response from the Execute Tool API.
属性#
billing?#
optionalbilling?:CompactBillingStatement
Structured pre-settlement billing statement when available
cost?#
optionalcost?:number
Legacy fallback estimate; use usage audit or credits ledger for final charge
created_at?#
optionalcreated_at?:string
Timestamp of execution (ISO 8601 format)
elapsed_time_ms?#
optionalelapsed_time_ms?:number
Execution duration in milliseconds (alternative field)
error_message?#
optionalerror_message?:string|null
Error message if execution failed. Common reasons: insufficient balance, quota exceeded, invalid parameters.
execution_id#
execution_id:
string
Unique identifier for this execution record
execution_time?#
optionalexecution_time?:number
Execution duration in seconds
parameters?#
optionalparameters?:Record<string,unknown>
The parameters that were passed to the tool
pre_settlement_bill?#
optionalpre_settlement_bill?:Record<string,unknown>
Legacy/full pre-settlement bill snapshot when returned directly
remaining_credits?#
optionalremaining_credits?:number
User's remaining credits after this execution
result?#
optionalresult?:ExecuteResult
The execution result.
Contains either data (if within size limit) or truncation info.
success#
success:
boolean
Whether the execution completed successfully
tool_id?#
optionaltool_id?:string
The tool that was executed
ExecuteResultData#
Result data when the response fits within max_response_size.
属性#
data#
data:
unknown
The actual result data from the tool execution
ExecuteResultFields#
Selected result fields returned by a fields:<JSONPath,...> projection.
属性#
data?#
optionaldata?:unknown
respond_with#
respond_with:
`fields:${string}`
ExecuteResultSummary#
Compact result returned by respond_with: "summary".
属性#
content_schema?#
optionalcontent_schema?:Record<string,unknown>
full_content_file_url?#
optionalfull_content_file_url?:string
message?#
optionalmessage?:string
respond_with#
respond_with:
"summary"
summary?#
optionalsummary?:object
索引签名#
[key: string]: unknown
fields?#
optionalfields?:string[]
row_count?#
optionalrow_count?:number
size_bytes?#
optionalsize_bytes?:number
ExecuteResultTruncated#
Result data when the response exceeds max_response_size. Provides truncated content and a URL to download the full result.
属性#
content_schema?#
optionalcontent_schema?:Record<string,unknown>
JSON Schema describing the structure of the full content. Helps the agent understand the data shape without downloading.
full_content_file_url#
full_content_file_url:
string
URL to download the complete result file. Valid for 120 minutes.
message#
message:
string
Explanation message about the truncation
truncated_content#
truncated_content:
string
The initial portion of the response (max_response_size bytes). Useful for previewing the data structure.
GetToolsByIdsRequest#
Request body for the Get Tools by IDs API.
属性#
search_id?#
optionalsearch_id?:string
The search_id from the search that returned the tool(s).
session_id?#
optionalsession_id?:string
Session identifier for tracking user sessions.
tool_ids#
tool_ids:
string[]
Array of tool IDs to retrieve information for.
InspectOptions#
Options for Qveris.inspect.
属性#
searchId?#
optionalsearchId?:string
The search_id from the discover call that returned the tool(s)
sessionId?#
optionalsessionId?:string
Session identifier for tracking
timeoutMs?#
optionaltimeoutMs?:number
Per-request timeout override in milliseconds
ProbeOptions#
Options for Qveris.probe.
属性#
checks?#
optionalchecks?:ProbeCheck[]
Checks to run. Defaults to schema.
liveBudget?#
optionalliveBudget?:ProbeLiveBudget
Probe budget. Every current value avoids capability execution.
parameters?#
optionalparameters?:Record<string,unknown>
Candidate parameters to validate without executing the capability.
timeoutMs?#
optionaltimeoutMs?:number
Per-request timeout override in milliseconds.
ProbeQuoteResult#
属性#
basis?#
optionalbasis?:string|null
currency#
currency:
"credits"
detail?#
optionaldetail?:Record<string,unknown> |null
estimate_credits?#
optionalestimate_credits?:number|null
exact#
exact:
boolean
ProbeRequest#
属性#
checks?#
optionalchecks?:ProbeCheck[]
live_budget?#
optionallive_budget?:ProbeLiveBudget
parameters?#
optionalparameters?:Record<string,unknown>
ProbeResponse#
属性#
coverage?#
optionalcoverage?:ProbeUnknownResult
quote?#
optionalquote?:ProbeQuoteResult
sample?#
optionalsample?:ProbeUnknownResult
schema?#
optionalschema?:ProbeSchemaResult
ProbeSchemaResult#
属性#
note?#
optionalnote?:string|null
valid#
valid:
boolean
violations?#
optionalviolations?:ProbeSchemaViolation[] |null
ProbeSchemaViolation#
属性#
message#
message:
string
param?#
optionalparam?:string|null
type#
type:
string
ProbeUnknownResult#
属性#
reason#
reason:
string
verdict#
verdict:
"unknown"
QverisClientConfig#
Configuration options for the Qveris API client.
属性#
apiKey#
apiKey:
string
API authentication token
baseUrl?#
optionalbaseUrl?:string
API base URL. Overrides QVERIS_BASE_URL and the built-in default.
maxRetries?#
optionalmaxRetries?:number
Max automatic retries for rate-limited (429) / transient (503) responses.
Honors Retry-After, otherwise backs off exponentially with jitter.
Defaults to 3; set to 0 to disable.
timeoutMs?#
optionaltimeoutMs?:number
Default request timeout in milliseconds
SearchRequest#
Request body for the Search Tools API.
属性#
lang?#
optionallang?:"zh"|"en"
Response language. Omit to use server-side language negotiation.
limit?#
optionallimit?:number
Maximum number of results to return. Minimum: 1. Maximum: 100.
默认值#
20query#
query:
string
Natural language search query describing the tool capability you need.
session_id?#
optionalsession_id?:string
Session identifier for tracking user sessions.
view?#
optionalview?:"routing"|"full"
Response projection. Omit for the legacy/full response shape.
SearchResponse#
Response from the Search Tools API.
属性#
elapsed_time_ms?#
optionalelapsed_time_ms?:number
Total elapsed time in milliseconds
query?#
optionalquery?:string
The original search query
remaining_credits?#
optionalremaining_credits?:number
User's remaining credits after this operation
results#
results:
ToolInfo[]
Array of matching tools
search_id#
search_id:
string
Unique identifier for this search. Required when calling call for any tool from these results.
stats?#
optionalstats?:SearchStats
Search performance statistics
total?#
optionaltotal?:number
Total number of results returned
SearchStats#
Performance statistics for a search operation.
属性#
fulltext_recall_count?#
optionalfulltext_recall_count?:number
Fulltext recall count
search_time_ms?#
optionalsearch_time_ms?:number
Total time to complete the search in milliseconds
vector_recall_count?#
optionalvector_recall_count?:number
Vector recall count
ToolCapability#
Standardized capability descriptor attached to a tool (e.g. "MKT.BARS.ADJUSTED" with market coverage tags).
属性#
id?#
optionalid?:string
tag?#
optionaltag?:ToolCapabilityTag[]
ToolCapabilityTag#
Coverage tag attached to a capability (e.g. market coverage).
属性#
description?#
optionaldescription?:string
id?#
optionalid?:string
name?#
optionalname?:string
type?#
optionaltype?:string
ToolCategory#
Category/tag attached to a tool.
Current API responses return category objects; legacy responses returned
plain strings, so ToolInfo.categories accepts both.
属性#
description?#
optionaldescription?:string
name?#
optionalname?:string
slug?#
optionalslug?:string
ToolExamples#
Example usage for a tool, showing sample parameters.
属性#
sample_parameters?#
optionalsample_parameters?:Record<string,unknown>
Sample parameter values demonstrating typical usage
ToolInfo#
Information about a tool returned from search results. Contains everything needed to understand and execute the tool.
属性#
as_of_support?#
optionalas_of_support?:boolean
Whether the capability supports point-in-time requests.
billing_rule?#
optionalbilling_rule?:BillingRule
Structured rule-level billing metadata when available
capabilities?#
optionalcapabilities?:ToolCapability[]
Standardized capability descriptors with coverage tags
capability?#
optionalcapability?:string
Compact capability label returned by the routing projection.
categories?#
optionalcategories?: (string|ToolCategory)[]
Tool categories/tags: category objects, or plain strings in legacy responses
cost_class?#
optionalcost_class?:string
Compact cost class returned by the routing projection.
description?#
optionaldescription?:string
Detailed description of what the tool does
docs_url?#
optionaldocs_url?:string
Documentation URL for the tool
examples?#
optionalexamples?:ToolExamples
Usage examples with sample parameters
expected_cost?#
optionalexpected_cost?:string|number
Pre-call cost estimate in credits, when available
final_score?#
optionalfinal_score?:number
Relevance score for the search query (0.0 - 1.0, higher = better match)
has_last_execution?#
optionalhas_last_execution?:boolean
Whether this tool has been executed before (verified in production)
last_execution_record?#
optionallast_execution_record?:Record<string,unknown>
Most recent execution record, if available
name?#
optionalname?:string
Human-readable display name
params?#
optionalparams?:ToolParameter[]
List of parameters the tool accepts
protocol?#
optionalprotocol?:string
Protocol type
provider_description?#
optionalprovider_description?:string
Description of the provider
provider_id?#
optionalprovider_id?:string
Provider identifier
provider_name?#
optionalprovider_name?:string
Name of the organization/service providing this tool
provider_website_url?#
optionalprovider_website_url?:string
Provider website URL
region?#
optionalregion?:string
Geographic availability of the tool.
- "global" - Available worldwide
- "US|CA" - Whitelist: only available in US and Canada
- "-CN|RU" - Blacklist: not available in China and Russia
reliability?#
optionalreliability?:string
Compact reliability grade returned by the routing projection.
stats?#
optionalstats?:ToolStats
Historical execution performance statistics
tool_id#
tool_id:
string
Unique identifier for the tool (used in call)
why_recommended?#
optionalwhy_recommended?:string
Human-readable explanation of why this tool was recommended (Discover results only)
ToolParameter#
Parameter definition for a tool.
属性#
description#
description:
string
Human-readable description of what this parameter does
enum?#
optionalenum?:string[]
If present, restricts valid values to this list
name#
name:
string
Parameter name (used as key in the parameters object)
required#
required:
boolean
Whether this parameter must be provided
type#
type:
"string"|"number"|"boolean"|"object"|"array"
Data type of the parameter
ToolStats#
Historical execution performance statistics for a tool.
属性#
avg_execution_time_ms?#
optionalavg_execution_time_ms?:number
Historical average execution time in milliseconds
cost?#
optionalcost?:number
Legacy fallback estimate in credits per call
success_rate?#
optionalsuccess_rate?:number
Historical success rate (0.0 - 1.0)
UsageEventItem#
属性#
actual_amount_credits?#
optionalactual_amount_credits?:number|null
billing_snapshot_status?#
optionalbilling_snapshot_status?:string|null
billing_summary?#
optionalbilling_summary?:string|null
charge_outcome?#
optionalcharge_outcome?:string|null
created_at#
created_at:
string
credits_ledger_entry_id?#
optionalcredits_ledger_entry_id?:string|null
display_target?#
optionaldisplay_target?:string|null
error_message?#
optionalerror_message?:string|null
event_type#
event_type:
string
execution_id?#
optionalexecution_id?:string|null
id#
id:
string
kind?#
optionalkind?:string|null
model?#
optionalmodel?:string|null
pre_settlement_amount_credits?#
optionalpre_settlement_amount_credits?:number|null
pre_settlement_bill?#
optionalpre_settlement_bill?:Record<string,unknown> |null
query?#
optionalquery?:string|null
requested_amount_credits?#
optionalrequested_amount_credits?:number|null
search_id?#
optionalsearch_id?:string|null
session_id?#
optionalsession_id?:string|null
settled_amount_credits?#
optionalsettled_amount_credits?:number|null
settlement_result?#
optionalsettlement_result?:Record<string,unknown> |null
source_ref_id?#
optionalsource_ref_id?:string|null
source_ref_type?#
optionalsource_ref_type?:string|null
source_system#
source_system:
string
success#
success:
boolean
tool_id?#
optionaltool_id?:string|null
UsageEventsResponse#
属性#
items#
items:
UsageEventItem[]
page#
page:
number
page_size#
page_size:
number
summary?#
optionalsummary?:Record<string,unknown> |null
total#
total:
number
UsageHistoryRequest#
属性#
bucket?#
optionalbucket?:string
charge_outcome?#
optionalcharge_outcome?:string
end_date?#
optionalend_date?:string
event_type?#
optionalevent_type?:string
execution_id?#
optionalexecution_id?:string
kind?#
optionalkind?:string
limit?#
optionallimit?:number
max_credits?#
optionalmax_credits?:number
min_credits?#
optionalmin_credits?:number
page?#
optionalpage?:number
page_size?#
optionalpage_size?:number
search_id?#
optionalsearch_id?:string
start_date?#
optionalstart_date?:string
success?#
optionalsuccess?:boolean
summary?#
optionalsummary?:boolean
类型别名#
ApiErrorType#
ApiErrorType =
"http_error"|"invalid_json"|"timeout"|"network_error"
ApiOperation#
ApiOperation =
"discover"|"inspect"|"probe"|"call"|"credits"|"usage_history"|"credits_ledger"
Error response from the Qveris API.
ExecuteResult#
ExecuteResult =
ExecuteResultData|ExecuteResultTruncated|ExecuteResultSummary|ExecuteResultFields|unknown[] |string|number|boolean|null
Union type for execution results (either full data or truncated).
ProbeCheck#
ProbeCheck =
"schema"|"quote"|"coverage"|"sample"
ProbeLiveBudget#
ProbeLiveBudget =
"none"|"metadata"|"sampled"
QverisClientOptions#
QverisClientOptions =
Omit<QverisClientConfig,"apiKey"> & {apiKey:string;credentialProvider?:never; } | {apiKey?:never;credentialProvider:CredentialProvider; }
Configuration accepted by the QVeris REST client.
函数#
getQverisTools()#
getQverisTools(
qveris,options?):object
Build Vercel AI SDK tools for the QVeris discover/inspect/call workflow.
参数#
qveris#
The Qveris client to route calls through.
options?#
Optional sessionId for correlation/pricing context.
sessionId?#
string
返回#
object
A tools object keyed by qveris_discover / qveris_inspect /
qveris_call, ready to pass to generateText/streamText.
qveris_call#
qveris_call:
object&object&object&object&object|never|object&object&object&object&object|never|object&object&object&object&object|never|object&object&object&object&object|never
qveris_discover#
qveris_discover:
object&object&object&object&object|never|object&object&object&object&object|never|object&object&object&object&object|never|object&object&object&object&object|never
qveris_inspect#
qveris_inspect:
never|object&object&object&object&object|never|object&object&object&object&object|never|object&object&object&object&object|never|object&object&object&object&object