Bagatur
ad7f2ec67d
standard-tests[patch]: test stop not stop_sequences ( #23200 )
2024-06-19 18:07:33 -07:00
Bagatur
d96f67b06f
standard-tests[patch]: Update chat model standard tests ( #22378 )
...
- Refactor standard test classes to make them easier to configure
- Update openai to support stop_sequences init param
- Update groq to support stop_sequences init param
- Update fireworks to support max_retries init param
- Update ChatModel.bind_tools to type tool_choice
- Update groq to handle tool_choice="any". **this may be controversial**
---------
Co-authored-by: Chester Curme <chester.curme@gmail.com>
2024-06-17 13:37:41 -07:00
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 ">
2024-05-17 13:51:26 -04:00
Erick Friis
29282371db
core: bind_tools interface on basechatmodel ( #20360 )
2024-04-12 01:32:19 +00:00
Erick Friis
e6806a08d4
multiple: standard chat model tests ( #20359 )
2024-04-11 18:23:13 -07:00
Erick Friis
855ba46f80
standard-tests: a standard unit and integration test set ( #20182 )
...
just chat models for now
2024-04-09 12:43:00 -07:00