Commit Graph

262 Commits (c53aa5cd37da7a2b6c6630097b813064247c460c)

Author SHA1 Message Date
William FH 163bf165ed
Add Batch Size kwarg to the llm start callback (#13483)
So you can more easily use the token counts directly from the API
endpoint for batch size of 1
9 months ago
Bagatur 2bc5bd67f7
RELEASE: core 0.0.4 (#13745) 9 months ago
Bagatur 32d087fcb8
REFACTOR: combine core documents files (#13733) 9 months ago
Bagatur 16af282429
BUGFIX: add prompt imports for backwards compat (#13702) 9 months ago
Bagatur e327bb4ba4
IMPROVEMENT: Conditionally import core type hints (#13700) 9 months ago
Bagatur a21e84faf7
BUGFIX: llm backwards compat imports (#13698) 9 months ago
tanujtiwari-at 5064890fcf
BUGFIX: handle tool message type when converting to string (#13626)
**Description:** Currently, if we pass in a ToolMessage back to the
chain, it crashes with error

`Got unsupported message type: `

This fixes it. 

Tested locally

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
9 months ago
Josep Pon Farreny 143049c90f
Added partial_variables to BaseStringMessagePromptTemplate.from_template(...) (#13645)
**Description:** BaseStringMessagePromptTemplate.from_template was
passing the value of partial_variables into cls(...) via **kwargs,
rather than passing it to PromptTemplate.from_template. Which resulted
in those *partial_variables being* lost and becoming required
*input_variables*.

Co-authored-by: Josep Pon Farreny <josep.pon-farreny@siemens.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
9 months ago
Erick Friis c5ae9f832d
INFRA: Lint for imports (#13632)
- Adds pydantic/import linting to core
- Adds a check for `langchain_experimental` imports to langchain
9 months ago
Bagatur c61e30632e
BUG: more core fixes (#13665)
Fix some circular deps:
- move PromptValue into top level module bc both PromptTemplates and
OutputParsers import
- move tracer context vars to `tracers.context` and import them in
functions in `callbacks.manager`
- add core import tests
9 months ago
Bagatur d32e511826
REFACTOR: Refactor langchain_core (#13627)
Changes:
- remove langchain_core/schema since no clear distinction b/n schema and
non-schema modules
- make every module that doesn't end in -y plural
- where easy have 1-2 classes per file
- no more than one level of nesting in directories
- only import from top level core modules in langchain
9 months ago
Harrison Chase d82cbf5e76
Separate out langchain_core package (#13577)
Co-authored-by: Nuno Campos <nuno@boringbits.io>
Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
9 months ago