langchain/libs/community/tests/integration_tests
shroominic dee72c46c1
community: Outlines integration (#27449)
In collaboration with @rlouf I build an
[outlines](https://dottxt-ai.github.io/outlines/latest/) integration for
langchain!

I think this is really useful for doing any type of structured output
locally.
[Dottxt](https://dottxt.co) spend alot of work optimising this process
at a lower level
([outlines-core](https://pypi.org/project/outlines-core/0.1.14/) written
in rust) so I think this is a better alternative over all current
approaches in langchain to do structured output.
It also implements the `.with_structured_output` method so it should be
a drop in replacement for a lot of applications.

The integration includes:
- **Outlines LLM class**
- **ChatOutlines class**
- **Tutorial Cookbooks**
- **Documentation Page**
- **Validation and error messages** 
- **Exposes Outlines Structured output features**
- **Support for multiple backends**
- **Integration and Unit Tests**

Dependencies: `outlines` + additional (depending on backend used)

I am not sure if the unit-tests comply with all requirements, if not I
suggest to just remove them since I don't see a useful way to do it
differently.

### Quick overview:

Chat Models:
<img width="698" alt="image"
src="https://github.com/user-attachments/assets/05a499b9-858c-4397-a9ff-165c2b3e7acc">

Structured Output:
<img width="955" alt="image"
src="https://github.com/user-attachments/assets/b9fcac11-d3e5-4698-b1ae-8c4cb3d54c45">

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-11-20 16:31:31 -05:00
..
adapters all: test 3.13 ci (#27197) 2024-10-25 12:56:58 -07:00
agent community[patch]: Release 0.2.11 (#24989) 2024-08-02 20:08:44 +00:00
cache community: Memcached LLM Cache Integration (#27323) 2024-11-07 03:07:59 +00:00
callbacks
chains all: test 3.13 ci (#27197) 2024-10-25 12:56:58 -07:00
chat_message_histories
chat_models community: Outlines integration (#27449) 2024-11-20 16:31:31 -05:00
cross_encoders
document_compressors community: add InfinityRerank (#27043) 2024-11-06 17:26:30 -08:00
document_loaders community[patch]: add to pypdf tests and run in CI (#26663) 2024-09-19 14:45:49 +00:00
document_transformers
embeddings all: test 3.13 ci (#27197) 2024-10-25 12:56:58 -07:00
examples
graph_vectorstores community: fixed bug in GraphVectorStoreRetriever (#27846) 2024-11-04 20:27:17 +00:00
graphs
indexes multiple: rely on asyncio_mode auto in tests (#27200) 2024-10-15 16:26:38 +00:00
llms community: Outlines integration (#27449) 2024-11-20 16:31:31 -05:00
memory
prompts
retrievers multiple: rely on asyncio_mode auto in tests (#27200) 2024-10-15 16:26:38 +00:00
smith/evaluation
storage standard-tests: rename langchain_standard_tests to langchain_tests, release 0.3.2 (#28203) 2024-11-18 19:10:39 -08:00
tools community[patch]: Add missing annotations (#24890) 2024-07-31 18:13:44 +00:00
utilities multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
vectorstores standard-tests: rename langchain_standard_tests to langchain_tests, release 0.3.2 (#28203) 2024-11-18 19:10:39 -08:00
__init__.py
.env.example
conftest.py
test_compile.py
test_dalle.py
test_document_transformers.py
test_long_context_reorder.py community[patch]: deprecate langchain_community Chroma in favor of langchain_chroma (#24474) 2024-07-22 11:00:13 -04:00
test_nuclia_transformer.py
test_pdf_pagesplitter.py