You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/community/langchain_community
Kate Silverstein 0bc4a9b3fc
community[minor]: Adds Llamafile as an LLM (#17431)
* **Description:** Adds a simple LLM implementation for interacting with
[llamafile](https://github.com/Mozilla-Ocho/llamafile)-based models.
* **Dependencies:** N/A
* **Issue:** N/A

**Detail**
[llamafile](https://github.com/Mozilla-Ocho/llamafile) lets you run LLMs
locally from a single file on most computers without installing any
dependencies.

To use the llamafile LLM implementation, the user needs to:

1. Download a llamafile e.g.
https://huggingface.co/jartine/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/TinyLlama-1.1B-Chat-v1.0.Q5_K_M.llamafile?download=true
2. Make the file executable.
3. Run the llamafile in 'server mode'. (All llamafiles come packaged
with a lightweight server; by default, the server listens at
`http://localhost:8080`.)


```bash
wget https://url/of/model.llamafile
chmod +x model.llamafile
./model.llamafile --server --nobrowser
```

Now, the user can invoke the LLM via the LangChain client:

```python
from langchain_community.llms.llamafile import Llamafile

llm = Llamafile()

llm.invoke("Tell me a joke.")
```
7 months ago
..
adapters community[patch]: docstrings (#16810) 8 months ago
agent_toolkits community[patch]: docstrings (#16810) 8 months ago
callbacks community: add gpt-4-turbo and gpt-4-0125 costs (#17349) 7 months ago
chat_loaders Do not issue beta or deprecation warnings on internal calls (#15641) 9 months ago
chat_message_histories infra: add print rule to ruff (#16221) 8 months ago
chat_models community[minor]: integrate chat models with Yuan2.0 (#16575) 7 months ago
docstore community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
document_loaders community[patch]: fix import in language parser (#17538) 7 months ago
document_transformers community[minor]: Adding asynchronous function implementation for Doctran (#15941) 8 months ago
embeddings community[patch]: Fixed the 'aembed' method of 'CohereEmbeddings'. (#16497) 7 months ago
example_selectors refactor `langchain.prompts.example_selector` (#15369) 8 months ago
graphs community[patch]: Added functions in NetworkxEntityGraph class (#17535) 7 months ago
indexes community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
llms community[minor]: Adds Llamafile as an LLM (#17431) 7 months ago
output_parsers langchain[patch], community[minor]: move `output_parsers.ernie_functions` (#16057) 8 months ago
retrievers infra: add print rule to ruff (#16221) 8 months ago
storage add mongodb_store (#13801) 7 months ago
tools community[patch]: Add async methods to VectorStoreQATool (#16949) 7 months ago
utilities community[minor]: Add pebblo safe document loader (#16862) 7 months ago
utils Add the BQ job usage tracking from LangChain (#17123) 7 months ago
vectorstores Add the BQ job usage tracking from LangChain (#17123) 7 months ago
__init__.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
cache.py Add async methods to InMemoryCache (#17425) 7 months ago
py.typed community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago