Commit Graph

973 Commits

Author SHA1 Message Date
Charles Frye
bfb23f4608
typo bugfixes in getting started with prompts (#651)
tl;dr: input -> word, output -> antonym, rename to dynamic_prompt
consistently

The provided code in this example doesn't run, because the keys are
`word` and `antonym`, rather than `input` and `output`.

Also, the `ExampleSelector`-based prompt is named `few_shot_prompt` when
defined and `dynamic_prompt` in the follow-up example. The former name
is less descriptive and collides with an earlier example, so I opted for
the latter.

Thanks for making a really cool library!
2023-01-19 07:05:20 -08:00
John
3adc5227cd
typo (#650) 2023-01-19 07:03:11 -08:00
Harrison Chase
052c361031
pinecone docstring (#654) 2023-01-19 07:02:52 -08:00
Harrison Chase
d54fd20ba4
bump version to 0065 (#646) 2023-01-18 07:53:39 -08:00
Harrison Chase
30abfc41c2
add instructions for saving loading (#642) 2023-01-18 00:19:05 -08:00
Harrison Chase
95720adff5
Add documentation for custom prompts for Agents (#631) (#640)
- Added a comment interpreting regex for `ZeroShotAgent`
- Added a note to the `Custom Agent` notebook

Co-authored-by: Sam Ching <samuel@duolingo.com>
2023-01-17 22:47:15 -08:00
Harrison Chase
6be5f4e4c4
Harrison/sql db chain (#641)
Co-authored-by: Bruno Bornsztein <bruno.bornsztein@gmail.com>
2023-01-17 22:32:28 -08:00
Chetanya Rastogi
b550f57912
Fix the env variable for OpenAI Base Url (#639)
For using Azure OpenAI API, we need to set multiple env vars. But as can
be seen in openai package
[here](48b69293a3/openai/__init__.py (L35)),
the env var for setting base url is named `OPENAI_API_BASE` and not
`OPENAI_API_BASE_URL`. This PR fixes that part in the documentation.
2023-01-17 22:30:29 -08:00
Harrison Chase
4d4cff0530
Harrison/cohere experimental (#638)
Co-authored-by: inyourhead <44607279+xettrisomeman@users.noreply.github.com>
2023-01-17 22:28:55 -08:00
Sasmitha Manathunga
5c97f70bf1
Fix CohereError: embed is not an available endpoint on this model (#637)
Running the Cohere embeddings example from the docs:

```python
from langchain.embeddings import CohereEmbeddings
embeddings = CohereEmbeddings(cohere_api_key= cohere_api_key)

text = "This is a test document."
query_result = embeddings.embed_query(text)
doc_result = embeddings.embed_documents([text])
```

I get the error:

```bash
CohereError(message=res['message'], http_status=response.status_code, headers=response.headers)      
cohere.error.CohereError: embed is not an available endpoint on this model
```

This is because the `model` string is set to `medium` which is not
currently available.

From the Cohere docs:

> Currently available models are small and large (default)
2023-01-17 22:26:07 -08:00
Francis
b374d481c8
fix typo (#636)
there is a small typo in one of the docs.
2023-01-17 22:17:50 -08:00
Francisco Ingham
b929fd9f59
Exclude reference to 'example' in api prompt (#629)
Co-authored-by: lesscomfortable <pancho_ingham@hotmail.com>
2023-01-16 22:45:14 -08:00
Harrison Chase
08400f5542
version bump to 0.0.64 (#624) 2023-01-15 19:02:48 -08:00
Steven Hoelscher
a5999351cf
chore: add release workflow (#360)
Adds release workflow that (1) creates a GitHub release and (2)
publishes built artifacts to PyPI

**Release Workflow**
1. Checkout `master` locally and cut a new branch
1. Run `poetry version <rule>` to version bump (e.g., `poetry version
patch`)
1. Commit changes and push to remote branch
1. Ensure all quality check workflows pass
1. Explicitly tag PR with `release` label
1. Merge to mainline

At this point, a release workflow should be triggered because:
* The PR is closed, targeting `master`, and merged
* `pyproject.toml` has been detected as modified
* The PR had a `release` label

The workflow will then proceed to build the artifacts, create a GitHub
release with release notes and uploaded artifacts, and publish to PyPI.

Example Workflow run:
https://github.com/shoelsch/langchain/actions/runs/3711037455/jobs/6291076898
Example Releases: https://github.com/shoelsch/langchain/releases

--

Note, this workflow is looking for the `PYPI_API_TOKEN` secret, so that
will need to be uploaded to the repository secrets. I tested uploading
as far as hitting a permissions issue due to project ownership in Test
PyPI.
2023-01-15 18:35:21 -08:00
Harrison Chase
3d43906572
Harrison/new api chain (#623)
Co-authored-by: Francisco Ingham <fpingham@gmail.com>
Co-authored-by: lesscomfortable <pancho_ingham@hotmail.com>
2023-01-15 18:34:43 -08:00
Harrison Chase
1c71fadfdc
more complex sql chain (#619)
add a more complex sql chain that first subsets the necessary tables
2023-01-15 17:07:21 -08:00
Harrison Chase
49b3d6c78c
Harrison/wiki update (#622)
Co-authored-by: Rubens Mau <rubensmau@gmail.com>
2023-01-15 16:45:16 -08:00
Harrison Chase
1ac3319e45
simplify parsing of the final answer (#621) 2023-01-15 16:39:27 -08:00
Harrison Chase
2a54e73fec
bump version to 0063 (#616) 2023-01-14 08:09:25 -08:00
Harrison Chase
57bbc5d6da
improve css (#615) 2023-01-14 07:39:29 -08:00
Nicolas
91d7fd20ae
feat: add custom prompt for QAEvalChain chain (#610)
I originally had only modified the `from_llm` to include the prompt but
I realized that if the prompt keys used on the custom prompt didn't
match the default prompt, it wouldn't work because of how `apply` works.

So I made some changes to the evaluate method to check if the prompt is
the default and if not, it will check if the input keys are the same as
the prompt key and update the inputs appropriately.

Let me know if there is a better way to do this.

Also added the custom prompt to the QA eval notebook.
2023-01-14 07:23:48 -08:00
Francisco Ingham
1787c473b8
Custom prompt option for llm_bash and api chains (#612)
Co-authored-by: lesscomfortable <pancho_ingham@hotmail.com>
2023-01-14 07:22:52 -08:00
Harrison Chase
67808bad0e
expose more serpapi parameters (#609) 2023-01-13 17:36:10 -08:00
Nicolas
b7225fd010
docs: fix small typo (#611) 2023-01-13 17:31:33 -08:00
Harrison Chase
e9301bf833
bump version to 0.0.62 (#607) 2023-01-13 07:47:59 -08:00
Harrison Chase
9f9afbb6a8
add custom prompt for LLMMathChain and SQLDatabase chain (#605) 2023-01-13 06:28:51 -08:00
Smit Shah
a87a2aacaa
[Minor Fix] Fix spacy TextSplitter init (#606) 2023-01-13 06:24:44 -08:00
Sasmitha Manathunga
3e55f1474e
docs: fix typo (#604) 2023-01-12 21:36:03 -08:00
babbldev
b5eb91536a
Added filter argument to pinecone queries, fixes #600 (#601)
Added filter argument to similarity_search() and
similarity_search_with_score()

Co-authored-by: Sam Cartford (MBP) <cartford@hey.com>
2023-01-12 21:15:51 -08:00
Sam Ching
c4c6bf6e6e
Add subsection for colab notebooks (#599)
Motivation is that these don't get lost in the Twitterverse!
2023-01-12 18:16:55 -08:00
Rukmal Weerawarana
0f544a8811
Fix minor error in LLM documentation (#602) 2023-01-12 18:16:32 -08:00
Ikko Eltociear Ashimine
60dfe58325
Fix typo in vector_db_qa.ipynb (#597)
paramter -> parameter
2023-01-12 08:23:24 -08:00
Harrison Chase
950a81399a
bump version to 61 (#596) 2023-01-12 07:20:16 -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
956416c150
Harrison/update links1 (#594)
update links to be relative

Co-authored-by: Marc Green <marcgreen@users.noreply.github.com>
2023-01-12 06:29:42 -08:00
Harrison Chase
8ab09c18a1
Return source documents option in VectorDBQA (#585) (#592)
Co-authored-by: lesscomfortable <pancho_ingham@hotmail.com>

Co-authored-by: Francisco Ingham <fpingham@gmail.com>
Co-authored-by: lesscomfortable <pancho_ingham@hotmail.com>
2023-01-12 06:09:32 -08:00
Harrison Chase
4c6c5f0391
wolfram alpha improvements (#591)
Co-authored-by: Nicolas <nicolascamara29@gmail.com>
2023-01-12 06:09:12 -08:00
Harrison Chase
a5ee7de650
pinecone changes (#590)
Co-authored-by: Smit Shah <who828@gmail.com>
Co-authored-by: iocuydi <46613640+iocuydi@users.noreply.github.com>
2023-01-12 06:08:47 -08:00
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