mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
Standardized output format for blocks/tools. Updated executor so we can now resolve sub-json values for tagged inputs. Updated serializer to match new block output format.
This commit is contained in:
@@ -13,8 +13,11 @@ interface RequestParams {
|
||||
}
|
||||
|
||||
interface RequestResponse extends ToolResponse {
|
||||
status: number
|
||||
headers: Record<string, string>
|
||||
output: {
|
||||
data: any
|
||||
status: number
|
||||
headers: Record<string, string>
|
||||
}
|
||||
}
|
||||
|
||||
export const requestTool: ToolConfig<RequestParams, RequestResponse> = {
|
||||
@@ -132,9 +135,12 @@ export const requestTool: ToolConfig<RequestParams, RequestResponse> = {
|
||||
: response.text())
|
||||
|
||||
return {
|
||||
output: data,
|
||||
status: response.status,
|
||||
headers
|
||||
success: response.ok,
|
||||
output: {
|
||||
data,
|
||||
status: response.status,
|
||||
headers
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user