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/core/langchain_core
ccurme 181dfef118
core, standard tests, partner packages: add test for model params (#21677)
1. Adds `.get_ls_params` to BaseChatModel which returns
```python
class LangSmithParams(TypedDict, total=False):
    ls_provider: str
    ls_model_name: str
    ls_model_type: Literal["chat"]
    ls_temperature: Optional[float]
    ls_max_tokens: Optional[int]
    ls_stop: Optional[List[str]]
```
by default it will only return
```python
{ls_model_type="chat", ls_stop=stop}
```

2. Add these params to inheritable metadata in
`CallbackManager.configure`

3. Implement `.get_ls_params` and populate all params for Anthropic +
all subclasses of BaseChatOpenAI

Sample trace:
https://smith.langchain.com/public/d2962673-4c83-47c7-b51e-61d07aaffb1b/r

**OpenAI**:
<img width="984" alt="Screenshot 2024-05-17 at 10 03 35 AM"
src="https://github.com/langchain-ai/langchain/assets/26529506/2ef41f74-a9df-4e0e-905d-da74fa82a910">

**Anthropic**:
<img width="978" alt="Screenshot 2024-05-17 at 10 06 07 AM"
src="https://github.com/langchain-ai/langchain/assets/26529506/39701c9f-7da5-4f1a-ab14-84e9169d63e7">

**Mistral** (and all others for which params are not yet populated):
<img width="977" alt="Screenshot 2024-05-17 at 10 08 43 AM"
src="https://github.com/langchain-ai/langchain/assets/26529506/37d7d894-fec2-4300-986f-49a5f0191b03">
4 months ago
..
_api core: use qualname in beta message (#20361) 5 months ago
beta core: Updated docstring for Context class (#19079) 6 months ago
callbacks core[major]: AsyncCallbackManagerForToolRun no longer casts return object to string (#20374) 4 months ago
document_loaders core[minor]: Add aload to document loader (#19936) 6 months ago
documents core[minor]: move document compressor base (#17910) 7 months ago
embeddings core[minor]: moved fake llms and embeddings to core (#19226) 6 months ago
example_selectors core[patch]: Fix typo in VectorStoreExampleSelector doc-string (#21574) 4 months ago
indexing core[patch[: docstring update (#21036) 5 months ago
language_models core, standard tests, partner packages: add test for model params (#21677) 4 months ago
load fix: core: Include in json output also fields set outside the constructor (#21342) 5 months ago
messages core[patch]: Fixes for convert_messages (#21207) 5 months ago
output_parsers core[patch]: improve comma separated list output parser to handle non-space separated list (#20434) 5 months ago
outputs core[patch]: fix ChatGeneration.text with content blocks (#20294) 5 months ago
prompts core[patch[: docstring update (#21036) 5 months ago
pydantic_v1 Separate out langchain_core package (#13577) 10 months ago
runnables [Core] Check is async callable (#21714) 4 months ago
tracers Finish agent migration doc (#21731) 4 months ago
utils core[patch]: `utils.guard_import` fix (#21133) 5 months ago
__init__.py core[patch], community[patch]: mark runnable context, lc load as beta (#15603) 9 months ago
agents.py docs: modules descriptions (#17844) 7 months ago
caches.py community[minor]: Add async methods to CassandraCache and CassandraSemanticCache (#20654) 5 months ago
chat_history.py core[patch],community[patch]: Move file chat history back to community (#20834) 5 months ago
chat_loaders.py core[minor], community[patch], langchain[patch]: move BaseChatLoader to core (#19607) 5 months ago
chat_sessions.py docs: modules descriptions (#17844) 7 months ago
env.py core[patch]: update langchain-core runtime library name (#14884) 9 months ago
exceptions.py docs: modules descriptions (#17844) 7 months ago
globals.py core[patch]: Move `globals` to a module instead of a package (non breaking change) (#19159) 6 months ago
memory.py docs: modules descriptions (#17844) 7 months ago
prompt_values.py core[patch[: docstring update (#21036) 5 months ago
py.typed core[minor], langchain[patch], experimental[patch]: Added missing `py.typed` to `langchain_core` (#14143) 10 months ago
retrievers.py patch: deprecate (a)get_relevant_documents (#20477) 5 months ago
stores.py core[minor],langchain[patch],community[patch]: Move storage interfaces to core (#20750) 5 months ago
structured_query.py core[patch[: docstring update (#21036) 5 months ago
sys_info.py docs: modules descriptions (#17844) 7 months ago
tools.py core[major]: only use function description (#21622) 4 months ago
vectorstores.py core[minor]: Add async methods to MaxMarginalRelevanceExampleSelector (#19639) 6 months ago