Commit Graph

332 Commits (harrison/pinecone-try-except)
 

Author SHA1 Message Date
Harrison Chase 69415734db cr 1 year ago
Harrison Chase 4018892f8a cr 1 year ago
Bernie G d39ab27969
Fix KeyError in pinecone wrapper (#568)
Pinecone can return multiple matches with different text keys in the
metadata, and the current behavior will throw a KeyError if one pops up
that isn't the expected text key. This PR only selects the matches with
the correct text key.
1 year ago
Harrison Chase 7a32cde5ff logging 1 year ago
Harrison Chase 50a49eff15
gallery updates (#573) 1 year ago
Harrison Chase 6966863d7d
Harrison/deployments (#572) 1 year ago
Harrison Chase 7de5139750
add example selector docs (#564) 1 year ago
Yong723 94c06c55e8
modify docstring (#569)
Sorry for the detail. this is a correction to the docstring.
1 year ago
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
1 year ago
Harrison Chase 6374df5a31
bump version (#565) 1 year ago
Harrison Chase b06a2a6191
improve documentation on how to pass in custom prompts (#561) 1 year ago
Harrison Chase 1511606799
Harrison/fix splitting (#563)
fix issue where text splitting could possibly create empty docs
1 year ago
Harrison Chase 1192cc0767
smart text splitter (#530)
smart text splitter that iteratively tries different separators until it
works!
1 year ago
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
1 year ago
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
1 year ago
Harrison Chase 823a44ef80
bump to 0058 (#556) 1 year ago
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":')
```
1 year ago
Harrison Chase 9833fcfe32
fix caching (#555) 1 year ago
Harrison Chase 74932f2516
RFC: conversational agent (#464)
Co-authored-by: Bruno Bornsztein <bruno.bornsztein@gmail.com>
1 year ago
Harrison Chase 330a5b42d4
fix map reduce chain (#550) 1 year ago
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>
1 year ago
Harrison Chase e64ed7b975
Harrison/tools priority (#554)
Co-authored-by: Yong723 <50616781+Yongtae723@users.noreply.github.com>
1 year ago
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
1 year ago
Harrison Chase 1f248c47f3
bump version to 0.0.57 (#548) 1 year ago
Harrison Chase 0c2f7d8da1
changes to qa chain (#543) 1 year ago
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.
1 year ago
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>
1 year ago
Harrison Chase 5aefc2b7ce
add handling on error (#541) 1 year ago
Harrison Chase 1631981f84
Harrison/fix and test caching (#538) 1 year ago
Harrison Chase 73f7ebd9d1
Harrison/sqlalchemy cache store (#536)
Co-authored-by: Jason Gill <jasongill@gmail.com>
1 year ago
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.
1 year ago
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.
1 year ago
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
1 year ago
Rubens Mau 020e73017b
Updated embeddings.ipynb (#531)
updated embeddings.ipynb
1 year ago
Ikko Eltociear Ashimine ca9aaac36e
Fix typo in key_concepts.md (#535)
therefor -> therefore
1 year ago
Harrison Chase 680f267179
bump version to 0056 (#533) 1 year ago
Harrison Chase 9e04c34e20
Add BaseCallbackHandler and CallbackManager (#478)
Co-authored-by: Ankush Gola <9536492+agola11@users.noreply.github.com>
1 year ago
Nuno Campos 6d78be0c83
Add link to gihub repo in header of new docs (#524) 1 year ago
Harrison Chase 447683de6f
bump version to 0.0.55 (#521) 1 year ago
Harrison Chase 0db05b6725
Harrison/add human prefix (#520)
Co-authored-by: Andrew Huang <jhuang16888@gmail.com>
1 year ago
Harrison Chase 03f185bcd5
more robust handling for max iterations (#514)
add a `generate` method which makes one final forward pass through the
llm
1 year ago
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
1 year ago
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.
1 year ago
Harrison Chase 3efec55f93
update lobby link (#517) 1 year ago
Harrison Chase 8f6c08863a
bump version to 0.0.54 (#512) 1 year ago
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>
1 year ago
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>
1 year ago
Keiji Kanazawa c5f0af9398
Minor docstring update (#507)
Update `model=` to `model_name=`.

No need to credit me for this 😄
1 year ago
Harrison Chase d95b39d37f
version 0.0.53 (#497) 1 year ago
Harrison Chase 0072686aab
Harrison/new search engine (#477)
Co-authored-by: Nicolas <nicolascamara29@gmail.com>
1 year ago