Commit Graph

485 Commits

Author SHA1 Message Date
Harrison Chase
7b6e7f6e12
bump to version 60 (#583) 2023-01-11 07:09:30 -08:00
Harrison Chase
3f2ea5c35e
Harrison/load from hub (#580) 2023-01-11 06:34:11 -08:00
Harrison Chase
f74ce7a104
Harrison/combine memories (#582)
Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
Co-authored-by: Diwank Singh Tomer <diwank.singh@gmail.com>
2023-01-11 06:08:58 -08:00
Harrison Chase
2aa08631cb
add similarity score method to faiss (#574)
adds `similarity_search_with_score` to faiss wrapper
2023-01-11 06:06:17 -08:00
Harrison Chase
5ba46f6d0c
Harrison/namespace pinecone (#581)
Co-authored-by: mmorzywolek <89693033+mmorzywolek@users.noreply.github.com>
2023-01-11 06:05:48 -08:00
Harrison Chase
ffc7e04d44
Harrison/wolfram alpha (#579)
Co-authored-by: Nicolas <nicolascamara29@gmail.com>
2023-01-11 05:52:19 -08:00
Harrison Chase
94765e7487
more gallery (#577) 2023-01-10 08:24:00 -08:00
Harrison Chase
50a49eff15
gallery updates (#573) 2023-01-10 07:41:29 -08:00
Harrison Chase
6966863d7d
Harrison/deployments (#572) 2023-01-10 07:41:16 -08:00
Harrison Chase
7de5139750
add example selector docs (#564) 2023-01-09 19:17:29 -08:00
Yong723
94c06c55e8
modify docstring (#569)
Sorry for the detail. this is a correction to the docstring.
2023-01-09 19:12:59 -08:00
Yong723
e1f3871a78
fix typo (#570)
I found a typo, which might be important for a conversational Agent.

if My PR is wrong, I am so sorry
2023-01-09 19:12:34 -08:00
Harrison Chase
6374df5a31
bump version (#565) 2023-01-09 12:34:47 -08:00
Harrison Chase
b06a2a6191
improve documentation on how to pass in custom prompts (#561) 2023-01-08 19:20:13 -08:00
Harrison Chase
1511606799
Harrison/fix splitting (#563)
fix issue where text splitting could possibly create empty docs
2023-01-08 19:19:32 -08:00
Harrison Chase
1192cc0767
smart text splitter (#530)
smart text splitter that iteratively tries different separators until it
works!
2023-01-08 15:11:10 -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
Nicolas
948eee9fe1
Docs: side menu to match the order (llms) (#557)
Small quick fix:

Suggest making the order of the menu the same as it is written on the
page (Getting Started -> Key Concepts). Before the menu order was not
the same as it was on the page. Not sure if this is the only place the
menu is affected.

Mismatch is found here:
https://langchain.readthedocs.io/en/latest/modules/llms.html
2023-01-06 09:34:08 -08:00
Harrison Chase
823a44ef80
bump to 0058 (#556) 2023-01-06 07:58:38 -08:00
Benjamin
42d5d988fa
add openai logit bias (#553)
Add
[`logit_bias`](https://beta.openai.com/docs/api-reference/completions/create#completions/create-logit_bias)
params to OpenAI

See [here](https://beta.openai.com/tokenizer) for the tokenizer.

NB: I see that others (like Cohere) have the same parameter, but since I
don't have an access to it, I don't want to make a mistake.

---

Just to make sure the default "{}" works for openai:
```
from langchain.llms import OpenAI

OPENAI_API_KEY="XXX"

llm = OpenAI(openai_api_key=OPENAI_API_KEY)
llm.generate('Write "test":')

llm = OpenAI(openai_api_key=OPENAI_API_KEY, logit_bias={'9288': -100, '1332': -100, '14402': -100, '6208': -100})
llm.generate('Write "test":')
```
2023-01-06 07:48:52 -08:00
Harrison Chase
9833fcfe32
fix caching (#555) 2023-01-06 07:30:10 -08:00
Harrison Chase
74932f2516
RFC: conversational agent (#464)
Co-authored-by: Bruno Bornsztein <bruno.bornsztein@gmail.com>
2023-01-06 07:25:55 -08:00
Harrison Chase
330a5b42d4
fix map reduce chain (#550) 2023-01-06 07:15:57 -08:00
Diwank Singh Tomer
ba0cbb4a41
Add finish reason to Generation for usage downstream (#526)
Add `finish_reason` to `Generation` as well as extend
`BaseOpenAI._generate` to include it in the output. This can be useful
for usage in downstream tasks when we need to filter for only
generations that finished because of `"stop"` for example. Maybe we
should add this to `LLMChain` as well?

For more details, see
https://beta.openai.com/docs/guides/completion/best-practices

Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
2023-01-06 07:15:25 -08:00
Harrison Chase
e64ed7b975
Harrison/tools priority (#554)
Co-authored-by: Yong723 <50616781+Yongtae723@users.noreply.github.com>
2023-01-06 06:56:11 -08:00
Harrison Chase
4974f49bb7
add return_direct flag to tool (#537)
adds a return_direct flag to tools, which just returns the tool output
as the final output
2023-01-06 06:40:32 -08:00
Harrison Chase
1f248c47f3
bump version to 0.0.57 (#548) 2023-01-05 09:46:44 -08:00
Harrison Chase
0c2f7d8da1
changes to qa chain (#543) 2023-01-05 09:33:59 -08:00
Hunter Gerlach
5b4c972fc5
Add linkcheck badge to signify when/if links are failing (#546)
Detect whether or not most recent GitHub Action running linkcheck was
successful.
2023-01-05 08:37:01 -08:00
Harrison Chase
9753bccc71
Feature: linkcheck-action (#534) (#542)
- Add support for local build and linkchecking of docs
- Add GitHub Action to automatically check links before prior to
publication
- Minor reformat of Contributing readme
- Fix existing broken links

Co-authored-by: Hunter Gerlach <hunter@huntergerlach.com>

Co-authored-by: Hunter Gerlach <HunterGerlach@users.noreply.github.com>
Co-authored-by: Hunter Gerlach <hunter@huntergerlach.com>
2023-01-04 21:39:50 -08:00
Harrison Chase
5aefc2b7ce
add handling on error (#541) 2023-01-04 20:23:55 -08:00
Harrison Chase
1631981f84
Harrison/fix and test caching (#538) 2023-01-04 18:39:06 -08:00
Harrison Chase
73f7ebd9d1
Harrison/sqlalchemy cache store (#536)
Co-authored-by: Jason Gill <jasongill@gmail.com>
2023-01-04 18:38:15 -08:00
Sam Ching
870cccb877
Add info to Contributors.md to avoid Conda/Pyenv dependency conflicts (#540)
As discussed in the
[Discord](https://discord.com/channels/1038097195422978059/1038097349660135474/1060194710485995521),
adding the following instructions to help future contributors avoid
dependency conflicts if they use Conda / Pyenv on their system.
2023-01-04 18:28:42 -08:00
Yongtae723
f48ab642be
replace forbid into ignore (#539)
this is the second PR of #519.
in #519 I suggested deleting Extra.forbid.
I was very confused but I replaced Extra.forbid to Extra.ignore, which
is the default of pydantic.


Since the
[BaseLLM](4b7b8229de/langchain/llms/base.py (L20))
from which it is inherited is set in Extra.forbid, I wanted to avoid
having the Extra.forbid settings inherited by simply deleting it.
2023-01-04 18:26:50 -08:00
Yongtae723
4b7b8229de
add logger (#529)
As talking #519, I made 2 PRs.

this is the first PR for adding a logger.

I am concerned about the following two points and would appreciate your
opinion.

1. Since the logger is not formatted, the statement itself is output
like a print statement, and I thought it was difficult to understand
that it was a warning, so I put WARNING! at the beginning of the warning
statement. After the logger formatting is done properly, the word
WARNING can be repeated.
2. Statement `Please confirm that {field_name} is what you intended.`
can be replaced like `If {field_name} is intended parameters, enter it
to model_kwargs`
thank you!

Yongtae
2023-01-04 10:44:24 -08:00
Rubens Mau
020e73017b
Updated embeddings.ipynb (#531)
updated embeddings.ipynb
2023-01-04 10:43:52 -08:00
Ikko Eltociear Ashimine
ca9aaac36e
Fix typo in key_concepts.md (#535)
therefor -> therefore
2023-01-04 10:43:02 -08:00
Harrison Chase
680f267179
bump version to 0056 (#533) 2023-01-04 09:12:56 -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
Nuno Campos
6d78be0c83
Add link to gihub repo in header of new docs (#524) 2023-01-03 10:16:59 -08:00
Harrison Chase
447683de6f
bump version to 0.0.55 (#521) 2023-01-03 08:37:16 -08:00
Harrison Chase
0db05b6725
Harrison/add human prefix (#520)
Co-authored-by: Andrew Huang <jhuang16888@gmail.com>
2023-01-03 08:03:50 -08:00
Harrison Chase
03f185bcd5
more robust handling for max iterations (#514)
add a `generate` method which makes one final forward pass through the
llm
2023-01-03 07:46:08 -08:00
Harrison Chase
40326c698c
unify argument name (#513)
unify names in map reduce and refine chains to just be
return_intermediate_steps

also unify the return key
2023-01-03 07:45:08 -08:00
lewtun
12108104c9
Add links to Hugging Face Hub docs (#518)
This PR adds some tweaks to the Hugging Face docs, mostly with links to
the Hub + relevant docs.
2023-01-03 07:43:57 -08:00
Harrison Chase
3efec55f93
update lobby link (#517) 2023-01-02 20:25:49 -08:00
Harrison Chase
8f6c08863a
bump version to 0.0.54 (#512) 2023-01-02 10:22:05 -08:00
Hunter Gerlach
7253fada0d
Fix/broken getting started link (#511)
I noticed (after publication) that the getting_started link on the main
page was borked. This should fix it.

Co-authored-by: Hunter Gerlach <hunter@huntergerlach.com>
2023-01-02 10:15:17 -08:00
Harrison Chase
985496f4be
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:

- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.

There is also a full reference section, as well as extra resources
(glossary, gallery, etc)

Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 08:24:09 -08:00