* add base Tool * minor update test_tool * update test dependency * update test dependency * Fix namespace conflict * update test * add base Agent Interface, add ReWoo Agent * minor update * update test * fix typo * remove unneeded print * update rewoo agent * add LLMTool * update BaseAgent type * add ReAct agent * add ReAct agent * minor update * minor update * minor update * minor update * update base reader with BaseComponent * add splitter * update agent and tool * update vectorstores * update load/save for indexing and retrieving pipeline * update test_agent for more use-cases * add missing dependency for test * update test case for in memory vectorstore * add TextSplitter to BaseComponent * update type hint basetool * add insurance mvp pipeline * update requirements * Remove redundant plugins param * Mock GoogleSearch --------- Co-authored-by: trducng <trungduc1992@gmail.com>
16 lines
401 B
Python
16 lines
401 B
Python
import pytest
|
|
|
|
|
|
@pytest.fixture(scope="function")
|
|
def mock_google_search(monkeypatch):
|
|
import googlesearch
|
|
|
|
def result(*args, **kwargs):
|
|
yield googlesearch.SearchResult(
|
|
url="https://www.cinnamon.is/en/",
|
|
title="Cinnamon AI",
|
|
description="Cinnamon AI is an enterprise AI company.",
|
|
)
|
|
|
|
monkeypatch.setattr(googlesearch, "search", result)
|