Add Langchain Agent wrapper with OpenAI Function / Self-ask agent support (#82)

* update Param() type hint in MVP

* update default embedding endpoint

* update Langchain agent wrapper

* update langchain agent
This commit is contained in:
Tuan Anh Nguyen Dang (Tadashi_Cin)
2023-11-20 16:26:08 +07:00
committed by GitHub
parent 0a3fc4b228
commit 8bb7ad91e0
9 changed files with 137 additions and 35 deletions

View File

@@ -43,14 +43,14 @@ class ReaderIndexingPipeline(BaseComponent):
reader_name: str = "normal" # "normal", "mathpix" or "ocr"
chunk_size: int = 1024
chunk_overlap: int = 256
vector_store: _[BaseVectorStore] = _(InMemoryVectorStore)
doc_store: _[BaseDocumentStore] = _(InMemoryDocumentStore)
vector_store: BaseVectorStore = _(InMemoryVectorStore)
doc_store: BaseDocumentStore = _(InMemoryDocumentStore)
doc_parsers: List[DocParser] = []
embedding: AzureOpenAIEmbeddings = AzureOpenAIEmbeddings.withx(
model="text-embedding-ada-002",
deployment="dummy-q2-text-embedding",
azure_endpoint="https://bleh-dummy-2.openai.azure.com/",
azure_endpoint="https://bleh-dummy.openai.azure.com/",
openai_api_key=os.environ.get("OPENAI_API_KEY", ""),
chunk_size=16,
)