912 Commits

Author SHA1 Message Date
me020523 74527d34b3 add StopReason field in Generation struct. (#458) rm 2023-12-28 15:18:52 -08:00
h3l 284a853cc9 support callback handler to llm chain (#461)
* support callback handler to llm chain

* fix golint

---------

Co-authored-by: lvzhong <lvzhong@bytedance.com>
2023-12-28 15:17:37 -08:00
h3l 580395f9d4 fix: avoid panic when call openai.NewChat() and openai.New() (#460)
avoid panic when opts is nil

Co-authored-by: lvzhong <lvzhong@bytedance.com>
2023-12-28 15:17:05 -08:00
chyroc 99bb50d3c7 Feat: use chains callback as streaming func (#447) 2023-12-24 21:05:42 -08:00
Abirdcfly e98eb1703a vectorstores: fix chroma not return score from SimilaritySearch (#449)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2023-12-24 18:17:23 -08:00
Jay Lalakiya 351b8b52b1 embeddings: Fix BatchTexts function (#453)
* Fix BatchTexts function in embeddings

* Add test cases for util func added
2023-12-23 13:47:11 -08:00
Travis Cline 213b9dca74 examples: Update langchaingo to v0.1.1 (#445) 2023-12-20 21:40:03 +00:00
Travis Cline 560f27812e deps: Update x/crypto (#444) v0.1.1 2023-12-20 20:04:19 +00:00
chyroc 55f772c21a Docs: fix comment typo (#442)
* Docs: fix comment typo

* docs: a llm -> an LLM

---------

Co-authored-by: Travis Cline <travis.cline@gmail.com>
2023-12-20 19:57:37 +00:00
chyroc 5eb184f48d feat: read OPENAI_API_BASE env to compatible with langchain (#437) 2023-12-20 11:56:25 -08:00
chyroc 4825e45403 feat: use WithCallback to set openai callback option (#438) 2023-12-20 11:56:16 -08:00
chyroc a5e1d6017c fix: remove suffix slash from openai base url (#436) 2023-12-20 11:52:42 -08:00
Mehul Shah dcae4f66a6 pgvector: Fix DropTable Function (#441)
drop embedding table before collection table

Co-authored-by: Mehul <mehul@gndctl.com>
2023-12-20 11:50:24 -08:00
Rey David Dominguez Soto 6ad961ac14 pgvector: support postgres schema (#439) 2023-12-20 11:34:16 -08:00
Bruce Bai eb17026117 test: fix api chain test error (#414) (#434) 2023-12-19 13:48:48 -08:00
Aksel fe6bcd51bf Merge pull request #413 from tmc/fixcomm
Clean up comments in chat_message_history
2023-12-18 18:39:49 +01:00
Eli Bendersky 895418c8c0 Clean up comments in chat_message_history 2023-12-16 06:33:38 -08:00
Travis Cline 4200608a75 chore: cleanup temporary files 2023-12-13 13:41:28 -08:00
Travis Cline a5b739aa66 deps: Run go mod tidy 2023-12-13 00:07:29 -08:00
Travis Cline 4b61176cd0 examples: Fix typo 2023-12-12 20:49:43 -08:00
Travis Cline 1c8e491300 examples: Use v0.1.0 2023-12-12 20:42:59 -08:00
Travis Cline c97f566a86 docs: Fix docs building v0.1.0 2023-12-12 20:31:54 -08:00
Travis Cline b0c827511c examples: Update langchaingo version in examples 2023-12-12 20:12:21 -08:00
Travis Cline aee820e3bb ollama: Add use of new chat endpoint (#406)
* ollama: Add use of new chat endpoint
2023-12-13 04:08:14 +00:00
Abirdcfly ed0536f392 vectorstores: add pgvector (#377)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2023-12-12 16:31:09 -08:00
Jeremy 00f364f27f embeddings: remove TEI embeddings client. (#396)
* remove tei embeddings
2023-12-09 13:48:32 -08:00
Semih Berkay Öztürk c997babc7b documentloaders: add notion directory loader (#401)
* add notion directory loader

* minor lint changes

---------

Co-authored-by: Semih Berkay Öztürk <90466553+semihberkayozturk@users.noreply.github.com>
2023-12-09 13:47:01 -08:00
sxk 71f182a7cf LLM: Integration of ERNIE-Bot-8K Model (#402)
add llm ERNIE-Bot-8K
2023-12-09 13:46:27 -08:00
fatedier e6c0ed45f2 openai message: support function call in client messages (#403) 2023-12-09 13:45:58 -08:00
Eli Bendersky af36340149 workflow: run CI on pushes to main branch, not other branches (#399)
* workflow: fix publish-docs workflow error (#398)

Fix errors like https://github.com/tmc/langchaingo/actions/runs/7094309081

* workflow: run CI on pushes to main branch, not other branches

Right now, each PR runs CI twice - once because it's a PR, and another
time because it comes from a push to a branch that created the PR.
See for example https://github.com/tmc/langchaingo/pull/398, causing:

- https://github.com/tmc/langchaingo/actions/runs/7094374726
- https://github.com/tmc/langchaingo/actions/runs/7094367361

This change makes it so we only run CI once per PR, because there's no
need to run it on a branch push.

Now CI runs on either a PR or a push to `main`
2023-12-04 22:41:23 -08:00
Eli Bendersky 0217b032f0 workflow: fix publish-docs workflow error (#398)
Fix errors like https://github.com/tmc/langchaingo/actions/runs/7094309081
2023-12-04 22:38:29 -08:00
Eli Bendersky 631c26cfa7 Delete binary file that was committed by mistake (#397)
Fixes #389
2023-12-04 22:38:29 -08:00
Eli Bendersky 357a3b5d3b embeddings: add example of proper usage, and tweak doc.go accordingly (#393)
* embeddings: add example of proper usage, and tweak doc.go accordingly

For #379

* Appease lint and add comment
2023-12-04 22:38:29 -08:00
Eli Bendersky 4bb28402cf embeddings: use NewEmbedder for Ernie embeddings (#392)
For #379

Updates examples go.mod because it's used in an example
2023-12-04 22:38:29 -08:00
Eli Bendersky f2439a3cf9 embeddings: use NewEmbedder for Vertex embeddings (#391)
For #379
2023-12-04 22:38:29 -08:00
Eli Bendersky 7dd3fd2a1c embeddings: new NewEmbedder for Ollama embeddings
The only use of Ollama embeddings is an example - update it too and
go.mod versions
2023-12-04 22:38:29 -08:00
Travis Cline 352b0ec3e3 Update README.md (#387) 2023-12-04 22:38:29 -08:00
Eli Bendersky d5d8a3e13d examples/pinecone-vectorstore-example: use new embedder (#386)
Now that the main module's version was bumped, update the example
to use a proper embedder
2023-12-04 22:38:29 -08:00
Eli Bendersky fc033c3471 embeddings: use NewEmbedder for OpenAI embeddings (#385)
This is the first use of the refactoring made in #374 -- removing the
embeddings/openai directory entirely, since it can be now implemented
with NewEmbedder without duplicating code. The test was moved one
dir down and works with the new setup.

This is a model that can be used to similarly refactor the other
embeddings/* subdirs.

This is a large PR because it also updates example go.mods

For #379
2023-12-04 22:38:29 -08:00
Jeremy c1d8f5f1ae Simplify milvus example (#383)
adding huggingface text embeddings interface as docker service for convienience
2023-12-04 22:38:29 -08:00
Jeremy 669c93d31d embeddings: TEI input truncation (enhancement) (#384)
add option to truncate tei embedding input
2023-12-04 22:38:29 -08:00
Travis Cline cda53c9ed7 examples: fix milvus example to not ask to run ollama (#381) 2023-12-04 22:38:29 -08:00
Travis Cline fa74369a81 examples: update examples (#380) 2023-12-04 22:38:29 -08:00
Jeremy 721e152d74 vectorstores: add Milvus (#352)
* adding milvus vector store

* adding hugging face text embedings

* adding milvus vector store example
2023-12-04 22:38:29 -08:00
sxk 1156076de1 LLM: Add support for Ernie chat_completions (#355)
* LLM: Add support for Ernie chat_completions

The current implementation lacks support for Ernie chat_completions, so I've added code for this. The committed changes include basic stream calls, function calls, and other capabilities.
2023-12-04 22:38:29 -08:00
Eli Bendersky 0e8d6dcea3 examples: move go.work creation to root (#378)
We only need a single go.work file in the reposotory, and `go work use -r .`
can recursively add all sub-modules to it, without requiring bash iteration.

Moves the creation of go.work into the root Makefile
go.work is still in .gitignore so it won't be committed

Fixes #375
2023-12-04 22:38:29 -08:00
Eli Bendersky 3d030fcbb3 embeddings: refactor embedding interfaces to enable creation from Chat and LLM (#374)
* Refactor embedding interfaces to enable creation from Chat and LLM

* embedding: add test that verifies assignability
2023-12-04 22:38:29 -08:00
dependabot[bot] a1d183f61b build(deps): bump axios, @docusaurus/core and @docusaurus/preset-classic in /docs (#366)
build(deps): bump axios, @docusaurus/core and @docusaurus/preset-classic

Bumps [axios](https://github.com/axios/axios) to 1.6.2 and updates ancestor dependencies [axios](https://github.com/axios/axios), [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) and [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic). These dependencies need to be updated together.


Updates `axios` from 0.25.0 to 1.6.2
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.25.0...v1.6.2)

Updates `@docusaurus/core` from 2.4.0 to 3.0.0
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.0/packages/docusaurus)

Updates `@docusaurus/preset-classic` from 2.4.0 to 3.0.0
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.0/packages/docusaurus-preset-classic)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@docusaurus/core"
  dependency-type: direct:production
- dependency-name: "@docusaurus/preset-classic"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Travis Cline <travis.cline@gmail.com>
2023-12-04 22:38:29 -08:00
Travis Cline 11a9bc33be readme: Fix discord link 2023-12-04 22:38:29 -08:00
Travis Cline db9fe9ee62 github: Run docs only on main 2023-12-04 22:38:29 -08:00