mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix: enforce proxy use for all exa endpoints
This commit is contained in:
@@ -535,7 +535,7 @@ export class ApiBlockHandler implements BlockHandler {
|
||||
throw new Error(`Tool not found: ${block.config.tool}`)
|
||||
}
|
||||
|
||||
const result = await executeTool(block.config.tool, inputs, true)
|
||||
const result = await executeTool(block.config.tool, inputs)
|
||||
if (!result.success) {
|
||||
throw new Error(result.error || `API request failed with no error message`)
|
||||
}
|
||||
@@ -592,7 +592,7 @@ export class GenericBlockHandler implements BlockHandler {
|
||||
throw new Error(`Tool not found: ${block.config.tool}`)
|
||||
}
|
||||
|
||||
const result = await executeTool(block.config.tool, inputs, true)
|
||||
const result = await executeTool(block.config.tool, inputs)
|
||||
if (!result.success) {
|
||||
throw new Error(result.error || `Block execution failed with no error message`)
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ export const answerTool: ToolConfig<ExaAnswerParams, ExaAnswerResponse> = {
|
||||
request: {
|
||||
url: 'https://api.exa.ai/answer',
|
||||
method: 'POST',
|
||||
isInternalRoute: false,
|
||||
headers: (params) => ({
|
||||
'Content-Type': 'application/json',
|
||||
'x-api-key': params.apiKey,
|
||||
|
||||
@@ -38,6 +38,7 @@ export const findSimilarLinksTool: ToolConfig<
|
||||
request: {
|
||||
url: 'https://api.exa.ai/findSimilar',
|
||||
method: 'POST',
|
||||
isInternalRoute: false,
|
||||
headers: (params) => ({
|
||||
'Content-Type': 'application/json',
|
||||
'x-api-key': params.apiKey,
|
||||
|
||||
@@ -36,6 +36,7 @@ export const getContentsTool: ToolConfig<ExaGetContentsParams, ExaGetContentsRes
|
||||
request: {
|
||||
url: 'https://api.exa.ai/contents',
|
||||
method: 'POST',
|
||||
isInternalRoute: false,
|
||||
headers: (params) => ({
|
||||
'Content-Type': 'application/json',
|
||||
'x-api-key': params.apiKey,
|
||||
|
||||
@@ -40,6 +40,7 @@ export const searchTool: ToolConfig<ExaSearchParams, ExaSearchResponse> = {
|
||||
request: {
|
||||
url: 'https://api.exa.ai/search',
|
||||
method: 'POST',
|
||||
isInternalRoute: false,
|
||||
headers: (params) => ({
|
||||
'Content-Type': 'application/json',
|
||||
'x-api-key': params.apiKey,
|
||||
|
||||
Reference in New Issue
Block a user