brainlid / langchain

Elixir implementation of an AI focused LangChain style framework.
https://hexdocs.pm/langchain/
Other
676 stars 72 forks source link

Add built-in support for Bing search tool using API #48

Open brainlid opened 12 months ago

brainlid commented 12 months ago
cpursley commented 8 months ago

Any update on support for this?

brainlid commented 8 months ago

Hi @cpursley! I haven't done anything towards this yet.

Here are some resources I expect will be helpful when writing it:

I noticed that the JS version of LangChain has dropped support for an explicit Bing search, but the Python version still has it.

The JS version has instead opted for SerpAPI Loader.

SerpAPI.com is an API service for normalizing web searches across many different providers.

This is probably the one to target.

Claims to have a "get started for free" level. I don't know anything beyond that. The lowest "Developer" pricing is $75/mo :grimacing:. They better have a free level of usage or I don't want to pay for building support and maintaining it.

The idea is to build support for this as a "tool" that exposes functions to an LLMChain to make execution and results automatic.

UPDATE: Just checked and the "free" level provides for 100 searches per month.

cpursley commented 8 months ago

Thanks for the detail. I'm actually using the official Bing API, it's pretty good.

Now that you mentioned that the Langchain JS dropped it, maybe it's not needed here either.

I wonder if some sort of generic API call (like function call) built on top of Req would be useful?

brainlid commented 8 months ago

If you've already got it working, then I'd love to add it. The 1000 transactions per month for free is 10x more than SerpAPI. It would be nice to have basic text searching supported like that (ie doesn't need to be image search, etc).

If you have something to share, it would be great and save time building it.

cpursley commented 8 months ago

Oh, sorry - to clarify I've just used that Bing API in the past not in the context of langchain.