tavily-ai/tavily-python

Using LangchainJS to call TavilySearch, unable to retrieve images.

Opened this issue · 1 comments

Hi,

const tools = [new TavilySearchResults({ maxResults: 3, apiKey: 'xxxx', kwargs: { include_images: true, include_answer: true, topic: 'general' } })]

    const prompt = await pull<ChatPromptTemplate>(
      'hwchase17/openai-functions-agent',
    )

    const agent = await createOpenAIFunctionsAgent({
      llm,
      tools,
      prompt,
    })

    const agentExecutor = new AgentExecutor({
      agent,
      tools,
    })

    const result = await agentExecutor.invoke({
      input: question,
    })
    console.log(result)

The retrieved content does not include images. However, using Tavily's playground, images can be retrieved.

Hello,

We are actively working on including the full Tavily search functionality as part of LangChain JavaScript. This update will introduce additional parameters and provide greater flexibility to the JavaScript implementation.

In the meantime, you can use our JavaScript SDK for Tavily Search, which offers many features to address your requirements.