Commit Graph

276 Commits

Author SHA1 Message Date
LangChain4j 97d7d0c755
Added an option to serialize and deserialize InMemoryEmbeddingStore to/from json or file (#120) 2023-08-22 18:40:15 +02:00
LangChain4j 8274ad6db6
Now in-process embedding models can embed texts longer than 510 tokens (#119)
If the text is longer than 510 tokens, it is automatically partitioned
into parts <= 510 tokens long. These partitions are embedded
independently and then weighted (by the number of tokens in each
partition) average embedding is calculated.

Related to https://github.com/langchain4j/langchain4j-embeddings/pull/4
2023-08-22 18:38:09 +02:00
LangChain4j 7307f43d98
Update README.md 2023-08-20 22:39:19 +02:00
LangChain4j 407db96385
Added more javadoc for Azure + embed max 16 segments at a time (#115)
Azure OpenAI can embed only 16 items at a time, so I have added an
internal loop in AzureOpenAiEmbeddingModel to embed in batches of 16.
2023-08-20 20:11:47 +02:00
jiangsier-xyz e0487baaa2
Make the langchain4j-dashscope pass the license compliance check (#111)
Note that the declaration of license in dashscope-sdk-java:pom.xml is:

<licenses>
    <license>
        <name>The Apache License, Version 2.0</name>
        <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        <distribution>repo</distribution>
    </license>
</licenses>

(There is a "The " prefix in its name.)
2023-08-20 20:09:06 +02:00
deep-learning-dynamo db1f236ed2 released 0.21.0 2023-08-19 15:57:39 +02:00
deep-learning-dynamo ed6158e8e5 ChatMemoryStore: renamed UserId to MemoryId 2023-08-19 13:46:54 +02:00
deep-learning-dynamo d013fb0aaa removed unnecessary code 2023-08-18 21:01:25 +02:00
kuraleta da45b7e259
Integration with Azure (#107) 2023-08-18 20:55:51 +02:00
jiangsier-xyz d908f5158a
Integrate the Qwen series models via dashscope-sdk. (#99)
Qwen series models are provided by Alibaba Cloud. They are much better
in Asia languages then other LLMs.

DashScope is a model service platform. Qwen models are its primary
supported models. But it also supports other series like LLaMA2, Dolly,
ChatGLM, BiLLa(based on LLaMA)...These may be integrated sometime in the
future.
2023-08-18 20:49:50 +02:00
Iurii Koval ec4a673b52
Add Milvus support (#58)
Authored-by: iurii.koval <koval.iurii@protonmail.com>
2023-08-18 20:38:45 +02:00
kuraleta 18dffd3521
Integration with Chroma, doc (#100) 2023-08-18 20:33:21 +02:00
LangChain4j ba7fc4def6
Added an option to store ChatMemory anywhere (in memory, DB, etc) (#106)
- Added ChatMemoryStore and InMemoryChatMemoryStore
- Changed MessageWindowChatMemory and TokenWindowChatMemory to use
ChatMemoryStore
- Changed Supplier<ChatMemory> into ChatMemoryProvider
- Small improvements
2023-08-18 20:31:22 +02:00
kuraleta 57a84d9a46
Integration with Chroma (#92) 2023-08-15 14:38:00 +02:00
deep-learning-dynamo d7b96ca9a6 released 0.20.0 2023-08-14 00:44:07 +02:00
LangChain4j 7b69a1691d
Added an option to setup a proxy for OpenAI models (#93) 2023-08-13 20:34:09 +02:00
LangChain4j 3179b1b64c
Added more pre-packaged in-process embedding models (#91) 2023-08-13 19:19:56 +02:00
LangChain4j 0632618adf
InMemoryEmbeddingStore: return matches from highest to lowest (#90) 2023-08-13 19:08:59 +02:00
deep-learning-dynamo 0e93deed77 released 0.19.0 2023-08-10 17:55:45 +02:00
deep-learning-dynamo 1541f214c1 released 0.19.0 2023-08-10 14:34:21 +02:00
LangChain4j f3757b8e18
[Snyk] Upgrade io.netty:netty-codec from 4.1.93.Final to 4.1.94.Final (#76)
authored-by: snyk-bot <snyk-bot@snyk.io>
2023-08-10 08:53:07 +02:00
LangChain4j 16a84a9074
[Snyk] Upgrade org.projectlombok:lombok from 1.18.26 to 1.18.28 (#74)
authored-by: snyk-bot <snyk-bot@snyk.io>
2023-08-10 08:49:04 +02:00
LangChain4j edc8400dff
[Snyk] Upgrade org.apache.pdfbox:pdfbox from 2.0.28 to 2.0.29 (#73)
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2023-08-10 08:46:16 +02:00
LangChain4j 93173f20d7
Added ability to estimate token count for tools (#81)
Also refactored MessageWindowChatMemory and TokenWindowChatMemory
2023-08-09 22:01:52 +02:00
LangChain4j 7497191bf9
Improvements (#79)
- did some refactorings
- added javadoc
- fixed NPE in PineconeEmbeddingStoreImpl when adding embedding by id
- PineconeEmbeddingStoreImpl now takes into account minScore and returns
score in EmbeddingMatch
- InMemoryEmbeddingStore now returns score instead of cosine similarity
2023-08-09 07:58:55 +02:00
Julien Perrochet 5cb371d7bf
[ci] let the compliance check run on all modules (#75)
Some leftovers from an earlier (and now incorrect) CI configuration.

Modules that don't need to comply with the licenses need to deactivate
the relevant plugin on a case-by-case basis.
2023-08-06 21:22:26 +02:00
Julien Perrochet 5659e8e2ba
[misc] migrate embeddings-related projects out of project (#72)
In-process embeddings are moved to their own repository
(https://github.com/langchain4j/langchain4j-embeddings) due to the size
of the involved files.

Note that once this PR is merged we'd ideally need a release so as to
have the `langchain4j-embeddings` related project depend on that
version.
2023-08-06 20:02:28 +02:00
LangChain4j 9a5da28cc4
Added support for a separate chat memory for each user to AI Services (#63) 2023-08-06 17:54:04 +02:00
LangChain4j 31e86fb5a7
Support for custom in-process embedding models (#71) 2023-08-06 17:10:09 +02:00
Heezer d45ddbfc7c
Weaviate support (#57)
Authored-by: Titov, Alexey <alexey.titov@adesso.de>
2023-08-06 17:03:39 +02:00
LangChain4j 7b4706d279
Added an option to force LLM to execute a particular tool (#68) 2023-08-06 14:04:33 +02:00
LangChain4j b4381bdf2e
Improved OpenAI tokenizer (#67)
Now function requests and responses are also counted toward total tokens
2023-08-04 00:24:22 +02:00
Hyungoo Kang 8450fa871a
Added document parser for MS Office (#66)
- Using Apache POI.
- Added test code and supported files.
2023-08-03 19:46:44 +02:00
LangChain4j d1f52577b1
Refactored in-process embeddings, added more docs (#55)
Co-authored-by: deep-learning-dynamo <deep-learning-dynamo@gmail.com>
2023-08-01 16:32:14 +02:00
deep-learning-dynamo 200bfe1fa3 updated langchain4j-pinecone name and description 2023-07-30 23:35:15 +02:00
LangChain4j fd83555e8b
Fixed tests that fail when running from IDE (#54)
Also added HTML document type.
2023-07-29 17:56:25 +02:00
LangChain4j ba45d546ee
Added DocumentTransformer and it's first implementation - HtmlTextExtractor (#53) 2023-07-29 17:22:54 +02:00
LangChain4j 78465c35c7
Added some javadoc (#52) 2023-07-29 17:12:36 +02:00
deep-learning-dynamo d4fca658c1 released 0.18.0 2023-07-26 21:19:24 +02:00
LangChain4j b9930e8345
Added LocalAI support to Spring Boot starter (#51)
Also added missing OpenAI configuration properties (topP, maxTokens, presencePenalty, frequencyPenalty, maxRetries)
2023-07-26 20:50:50 +02:00
LangChain4j 5666328f90
renamed DocumentSplitter split() to splitAll() (#50) 2023-07-25 19:22:29 +02:00
kuraleta 6e240e48a8
Local AI Integration (#49) 2023-07-25 19:15:39 +02:00
LangChain4j 8d6f9f66bf
Removed duplicated logic between model classes (#47) 2023-07-24 19:59:06 +02:00
LangChain4j 540741c8e5
Temporarily disabled in-process embedding model tests (#48)
We are out of free Git LFS quota
2023-07-24 19:52:30 +02:00
LangChain4j 80f71feeb6
Added support for streaming to AI Services (#45)
Now one can use TokenStream as a return type in his AI Service in order
to stream response from LLM
2023-07-23 19:14:58 +02:00
LangChain4j 529ef6b647
Added in-process embedding models (#41)
- all-minilm-l6-v2
- all-minilm-l6-v2-q
- e5-small-v2
- e5-small-v2-q

The idea is to give users an option to embed documents/texts in the same
Java process without any external dependencies.
ONNX Runtime is used to run models inside JVM.
Each model resides in it's own maven module (inside the jar).
2023-07-23 19:05:13 +02:00
LangChain4j 3cc75c771e
Added support for streaming ToolExecutionRequest from LLM (#44)
Now, the StreamingChatLanguageModel can be used in conjunction with
tools.
One can send tool specifications along with a message to the LLM, and
the LLM can either stream a response or initiate a request to execute a
tool (also as a stream of tokens).
2023-07-23 18:15:36 +02:00
LangChain4j 81e1a9c3e8
Updated to 0.17.0 2023-07-21 22:51:09 +02:00
deep-learning-dynamo 1976560aeb released 0.16.0 2023-07-18 10:49:43 +02:00
LangChain4j 99c4621a19
Added more request parameters to OpenAi models (#36)
- top_p
- max_tokens
- presence_penalty
- frequency_penalty
2023-07-18 10:15:50 +02:00