Commit Graph

485 Commits

Author SHA1 Message Date
andersenchen
5267ebce2d
Add LLMCheckerChain (#281)
Implementation of https://github.com/jagilley/fact-checker. Works pretty
well.

<img width="993" alt="Screenshot 2022-12-07 at 4 41 47 PM"
src="https://user-images.githubusercontent.com/101075607/206302751-356a19ff-d000-4798-9aee-9c38b7f532b9.png">

Verifying this manually:
1. "Only two kinds of egg-laying mammals are left on the planet
today—the duck-billed platypus and the echidna, or spiny anteater."
https://www.scientificamerican.com/article/extreme-monotremes/
2. "An [Echidna] egg weighs 1.5 to 2 grams (0.05 to 0.07
oz)[[19]](https://en.wikipedia.org/wiki/Echidna#cite_note-19) and is
about 1.4 centimetres (0.55 in) long."
https://en.wikipedia.org/wiki/Echidna#:~:text=sleep%20is%20suppressed.-,Reproduction,a%20reptile%2Dlike%20egg%20tooth.
3. "A [platypus] lays one to three (usually two) small, leathery eggs
(similar to those of reptiles), about 11 mm (7⁄16 in) in diameter and
slightly rounder than bird eggs."
https://en.wikipedia.org/wiki/Platypus#:~:text=It%20lays%20one%20to%20three,slightly%20rounder%20than%20bird%20eggs.
4. Therefore, an Echidna is the mammal that lays the biggest eggs.


cc @hwchase17
2022-12-09 12:49:05 -08:00
Harrison Chase
43c9bd869f
add memprompt docs (#294) 2022-12-09 12:40:24 -08:00
Ben
0f399350f1
Fix typo in Getting Started / LLM Chains docs (#291)
I noticed this typo when reading the getting started guide, hope this
fix makes sense.
2022-12-09 06:48:02 -08:00
Harrison Chase
85c66dc6a4
bump version to 0033 (#290) 2022-12-09 06:47:49 -08:00
Samantha Whitmore
b10be842f6
ChatGPT Clone: adding ConversationBufferWindowMemory to replicate vir… (#288)
…tual env example
2022-12-08 23:01:08 -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
Harrison Chase
c27a6fa8a4
update docs (#278) 2022-12-07 08:40:08 -08:00
Harrison Chase
1690292b09
bump version to 0031 (#276) 2022-12-07 07:29:08 -08:00
Harrison Chase
834b391792
update notebooks (#275) 2022-12-06 22:55:27 -08:00
Harrison Chase
3c1c7ba672
update branch name in gha (#274) 2022-12-06 22:28:50 -08:00
Akash Samant
48b093823e
Add a Transformation Chain (#257)
Arbitrary transformation chains that can be used to add dictionary
extractions from llms/other chains
2022-12-06 21:58:16 -08:00
coyotespike
b7bef36ee1
BashChain (#260)
Love the project, a ton of fun!

I think the PR is pretty self-explanatory, happy to make any changes! I
am working on using it in an `LLMBashChain` and may update as that
progresses.

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2022-12-06 21:57:50 -08:00
Harrison Chase
28be37f470
LLMRequestsChain (#267) 2022-12-06 21:55:02 -08:00
John McDonnell
68666d6a22
Gracefully degrade when model asks for nonexistent tool (#268)
Not yet tested, but very simple change, assumption is that we're cool
with just producing a generic output when tool is not found
2022-12-06 21:52:48 -08:00
Harrison Chase
2180a91196
bump 0.0.30 (#269) 2022-12-06 05:57:00 -08:00
Harrison Chase
2163d064f3
add return of ids (#254)
not actually sure the desired return in add_example to example selector
is actually general/good - whats the use case?
2022-12-05 12:50:48 -08:00
Harrison Chase
8cba5b791a
hotfix for api logging (#262) 2022-12-04 21:12:05 -08:00
Harrison Chase
5cd6956d58
Harrison/version 0028 (#259) 2022-12-04 17:44:40 -08:00
Harrison Chase
f5c665a544
combine python files (#256) 2022-12-04 15:57:36 -08:00
Steven Hoelscher
98fb19b535
chore: use poetry as dependency manager (#242)
* Adopts [Poetry](https://python-poetry.org/) as a dependency manager
* Introduces dependency version requirements
* Deprecates Python 3.7 support

**TODO**
- [x] Update developer guide
- [x] Add back `playwright`, `manifest-ml`, and `jupyter` to dependency
group

**Not Doing => Fast Follow**
- Investigate single source for version, perhaps relying on GitHub tags
and [tackling this
issue](https://github.com/hwchase17/langchain/issues/26)
2022-12-03 16:42:59 -08:00
Harrison Chase
988cb51a7c
fix out of date docs (#255) 2022-12-03 14:48:42 -08:00
Harrison Chase
9481a23314
stop using chained input except in agent (#249) 2022-12-03 14:15:56 -08:00
Harrison Chase
b5d8434a50
Harrison/improve chain docs (#251) 2022-12-03 13:28:50 -08:00
Harrison Chase
ac2c2f6f28
Harrison/delete bad code (#253) 2022-12-03 13:28:29 -08:00
Harrison Chase
db58032973
introduce output parser (#250) 2022-12-03 13:28:07 -08:00
Scott Leibrand
b4762dfff0
Refine Olivia Wilde's boyfriend example prompt to work better (#248)
With the original prompt, the chain keeps trying to jump straight to
doing math directly, without first looking up ages. With this two-part
question, it behaves more as intended:


> Entering new ZeroShotAgent chain...
How old is Olivia Wilde's boyfriend? What is that number raised to the
0.23 power?
Thought: I need to find out how old Olivia Wilde's boyfriend is, and
then use a calculator to calculate the power.
Action: Search
Action Input: Olivia Wilde's boyfriend age
Observation: While Wilde, 37, and Styles, 27, have both kept a low
profile when it comes to talking about their relationship, Wilde did
address their ...
Thought: Olivia Wilde's boyfriend is 27 years old.
Action: Calculator
Action Input: 27^0.23

> Entering new LLMMathChain chain...
27^0.23

```python
import math
print(math.pow(27, 0.23))
```

Answer: 2.1340945944237553

> Finished LLMMathChain chain.

Observation: Answer: 2.1340945944237553

Thought: I now know the final answer.
Final Answer: 2.1340945944237553
> Finished ZeroShotAgent chain.
2022-12-03 08:11:38 -08:00
Harrison Chase
a9ce04201f
Harrison/improve usability of api chain (#247)
improve usability of api chain
2022-12-02 15:44:10 -08:00
Harrison Chase
c897bd6cbd
api chain (#246)
Co-authored-by: Subhash Ramesh <33400216+thecooltechguy@users.noreply.github.com>
2022-12-02 13:39:36 -08:00
Harrison Chase
024c3e1dbe
add react text world doc (#245) 2022-12-02 09:07:21 -08:00
Harrison Chase
8145c79fd8
bump version to 0.0.27 (#244) 2022-12-02 07:27:36 -08:00
Harrison Chase
78a29f1060
text world agent (#240) 2022-12-01 17:45:28 -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
473943643e
bump version 0026 (#235) 2022-12-01 09:01:15 -08:00
Harrison Chase
3ca2c8d6c5
allow passing of stop params into openai (#232) 2022-11-30 22:20:13 -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
Harrison Chase
ab9abf53b7
Harrison/version 0025 (#227) 2022-11-30 06:48:22 -08:00
Harrison Chase
3bda0019ae
Harrison/list of examples (#218) 2022-11-29 20:08:00 -08:00
Harrison Chase
ca2394028f
move search to not be a chain (#226) 2022-11-29 20:07:44 -08:00
Harrison Chase
b19a73be26
pal chain touch ups (#225)
expose PAL in main entrypoint
2022-11-29 18:13:21 -08:00
Andrew Gleave
ea67c049f0
Support SQL statements that return no results (#222)
Adds support for statements such as insert, update etc which do not
return any rows.

`engine.execute` is deprecated and so execution has been updated to use
`connection.exec_driver_sql` as-per:


https://docs.sqlalchemy.org/en/14/core/connections.html#sqlalchemy.engine.Engine.execute
2022-11-29 08:28:45 -08:00
Akash Samant
d368c43648
Bug Fix (#221)
Quick bug fix for semantic similarity vector injection
2022-11-29 07:03:40 -08:00
Harrison Chase
1db7b18341
bump version to 0.0.24 (#220) 2022-11-28 22:20:30 -08:00
Harrison Chase
1b9b8efbc9
pal chain (#207)
from https://arxiv.org/pdf/2211.10435.pdf
2022-11-28 21:38:34 -08:00
Shyamal H Anadkat
de4b255c1f
Switch default openai model to text-davinci-003 (#215) 2022-11-28 18:03:34 -08:00
Harrison Chase
0568998166
Harrison/fix react stateful (#219)
fix issue with react being stateful
2022-11-28 18:03:04 -08:00
Harrison Chase
03c7140228
fix self ask template (#216) 2022-11-28 17:27:26 -08:00
Harrison Chase
cf3569fb1b
remove check (#217)
doesnt do much
2022-11-28 17:27:11 -08:00
Hansen Qian
a39c998342
Add chain name to verbose logging (#214)
Adds some context over what chain is running, thereby making it more
obvious how different chains are entered and existed

<img width="867" alt="Screen Shot 2022-11-28 at 11 55 34 AM"
src="https://user-images.githubusercontent.com/2548973/204336849-25d87b44-6f5d-487b-b583-5455f306a470.png">

(note that the `...` is because the output is too long and VSCode
truncated it)
2022-11-28 11:11:30 -08:00
Harrison Chase
261029cef3
bump version to 0.0.23 (#211) 2022-11-27 19:51:11 -08:00