Open Tomas2D opened 1 month ago
apiKey
parameter.http_proxy_url
parameter and use this proxy for all requests.The second should be optional. I would allow the user to pass custom overrides for underlying fetch
parameter calls.
I'd be interested to take a look as a first issue within the framework/api.
Previously I've been looking at the stack and raising a few issues/PRs
I think the request here is to add the API tool into the built in tools (as documented here), similar to how we have google, wikipedia, openMeteo etc.
I'm not certain on what then needs to be added/left in the bee-api itself since in general custom tools are found dynamically. For core tools, mostly it just seems to require creating an instance of the tool
Yes, this issue is about migrating this basic implementation to the framework and making it more robust. After that, we will use this tool instead of the current implementation in the API. This issue is only about the framework part.
@planetf1 I just assigned you the ticket, feel free to reach out if you have any questions/blockers!
@mmurad2 thanks
I'm making a first-pass at the change. I have implementation code, and just debugging a simple e2e test. Will share as a draft PR once a basic test works
I've added a first-pass draft PR. There is still more to do, but since I am just learning about the bee framework, it would be great if you could check the nature of the change I'm proposing matches your expectations.
I made a few changes from the original code
Tests need more work
only a simple 'happy path' is coded to check something is sent and received. The response isn't valid, and may not be correct. Just enough to get the code structure in place by end of week.
There's also improvements to the tool itself - such as how error responses are handled, timeout configuration etc.
Take the following implementation and add it to the framework.
https://github.com/i-am-bee/bee-api/blob/main/src/runs/execution/tools/api-call-tool.ts#L42C1-L43C1
Are there any blockers or things to consider? @pilartomas, @xjacka