Commit Graph

29 Commits

Author SHA1 Message Date
Ankush Gola d3ec00b566 Callbacks Refactor [base] (#3256)
Co-authored-by: Nuno Campos <nuno@boringbits.io>
Co-authored-by: Davis Chase <130488702+dev2049@users.noreply.github.com>
Co-authored-by: Zander Chase <130414180+vowelparrot@users.noreply.github.com>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2023-04-30 11:14:09 -07:00
Ankush Gola b82cbd1be0 Use run and arun in place of combine_docs and acombine_docs (#2635)
`combine_docs` does not go through the standard chain call path which
means that chain callbacks won't be triggered, meaning QA chains won't
be traced properly, this fixes that.

Also fix several errors in the chat_vector_db notebook
2023-04-09 18:47:59 -07:00
leo-gan fd69cc7e42 Removed duplicate BaseModel dependencies (#2471)
Removed duplicate BaseModel dependencies in class inheritances.
Also, sorted imports by `isort`.
2023-04-06 12:45:16 -07:00
Kei Kamikawa 35a3218e84 supported async retriever (#2149) 2023-03-30 10:14:05 -04:00
Walter Beller-Morales 859502b16c Fix issue#1712: Update BaseQAWithSourcesChain to handle space & newline after SOURCES: (#2118)
Fix the issue outlined in #1712 to ensure the `BaseQAWithSourcesChain`
can properly separate the sources from an agent response even when they
are delineated by a newline.

This will ensure the `BaseQAWithSourcesChain` can reliably handle both
of these agent outputs:

* `"This Agreement is governed by English law.\nSOURCES: 28-pl"` ->
`"This Agreement is governed by English law.\n`, `"28-pl"`
* `"This Agreement is governed by English law.\nSOURCES:\n28-pl"` ->
`"This Agreement is governed by English law.\n`, `"28-pl"`

I couldn't find any unit tests for this but please let me know if you'd
like me to add any test coverage.
2023-03-28 15:28:20 -07:00
Harrison Chase 47d37db2d2 WIP: Harrison/base retriever (#1765) 2023-03-24 07:46:49 -07:00
Harrison Chase fab7994b74 Harrison/retrieval code (#1916) 2023-03-22 23:15:04 -07:00
Harrison Chase b1c4480d7c fix typing (#1807) 2023-03-20 07:50:49 -07:00
Harrison Chase 8f21605d71 add return source docs (#1515) 2023-03-07 21:09:36 -08:00
Harrison Chase 0e21463f07 (rfc) chat models (#1424)
Co-authored-by: Ankush Gola <ankush.gola@gmail.com>
2023-03-06 08:34:24 -08:00
Samantha Whitmore be7de427ca Serialize all the chains! (#761)
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2023-01-27 00:45:17 -08:00
Smit Shah 28efbb05bf Add params to reduce K dynamically to reduce it below token limit (#739)
Referring to #687, I implemented the functionality to reduce K if it
exceeds the token limit.

Edit: I should have ran make lint locally. Also, this only applies to
`StuffDocumentChain`
2023-01-26 19:43:01 -08:00
Harrison Chase 983b73f47c add search kwargs (#664) 2023-01-20 07:42:08 -08:00
iocuydi 207e319a70 Add search_kwargs option for VectorDBQAWithSourcesChain (#657)
Allows for passing additional vectorstore params like namespace, etc. to
VectorDBQAWithSourcesChain

Example:
`chain = VectorDBQAWithSourcesChain.from_llm(OpenAI(temperature=0),
vectorstore=store, search_kwargs={"namespace": namespace})`
2023-01-19 14:48:13 -08:00
Harrison Chase d574bf0a27 add documentation on how to load different chain types (#595) 2023-01-12 06:47:38 -08:00
Harrison Chase 8dfad874a2 map rerank chain (#516)
add a chain that applies a prompt to all inputs and then returns not
only an answer but scores it

add examples for question answering and question answering with sources
2023-01-08 06:49:22 -08:00
Harrison Chase 0c2f7d8da1 changes to qa chain (#543) 2023-01-05 09:33:59 -08:00
Harrison Chase 9e04c34e20 Add BaseCallbackHandler and CallbackManager (#478)
Co-authored-by: Ankush Gola <9536492+agola11@users.noreply.github.com>
2023-01-04 07:54:25 -08:00
Harrison Chase 0f1df0dc2c bump to version 0.0.52 (#470) 2022-12-29 09:23:19 -05:00
Parth Chadha e88e66f982 Pass verbose argument to LLMChains when using *DocumentsChain (#458)
When using chains such as Summarization chain (`load_summarize_chain`),
the verbose flag wasn't propagated to the `LLMChain`.
2022-12-29 08:22:31 -05:00
Harrison Chase b7566b5ec3 Harrison/return intermediate steps (#428) 2022-12-27 08:22:48 -05:00
Harrison Chase 6be5747466 RFC: add cache override to LLM class (#379) 2022-12-19 17:36:14 -05:00
Harrison Chase 3474f39e21 Harrison/improve cache (#368)
make it so everything goes through generate, which removes the need for
two types of caches
2022-12-18 16:22:42 -05:00
Harrison Chase 750edfb440 add optional collapse prompt (#358) 2022-12-16 06:25:29 -08:00
Harrison Chase 36b4c58acf expose more stuff (#306) 2022-12-10 23:16:32 -08:00
Harrison Chase e2e501aa06 Harrison/version 0032 (#283) 2022-12-08 07:59:58 -08:00
Harrison Chase e9b1c8cdfa Harrison/base combine doc chain (#264) 2022-12-07 22:56:26 -08:00
Xupeng (Tony) Tong bb4bf9d6d0 chore: minor clean up / formatting (#233)
to get familiarize with the project
2022-12-01 10:50:36 -08:00
Harrison Chase 347fc49d4d Harrison/combine documents chain (#212)
combine documents chain powering vector db qa with sources chain
2022-11-30 22:00:02 -08:00