langchain/libs/partners/anthropic
JongRok BAEK 3b8eba32f9
anthropic[patch]: Fix message type lookup in Anthropic Partners (#16563)
- **Description:** 

The parameters for user and assistant in Anthropic should be 'ai ->
assistant,' but they are reversed to 'assistant -> ai.'
Below is error code.
```python
anthropic.BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages: Unexpected role "ai". Allowed roles are "user" or "assistant"'}}
```

[anthropic](7177f3a71f/src/anthropic/types/beta/message_param.py (L13))

  - **Issue:** : #16561
  -  **Dependencies:** : None
   - **Twitter handle:** : None
2024-01-25 09:17:59 -08:00
..
langchain_anthropic anthropic[patch]: Fix message type lookup in Anthropic Partners (#16563) 2024-01-25 09:17:59 -08:00
scripts anthropic: beta messages integration (#14928) 2023-12-19 18:55:19 -08:00
tests anthropic[patch]: allow pop by field name (#16544) 2024-01-24 15:48:31 -07:00
.gitignore anthropic: beta messages integration (#14928) 2023-12-19 18:55:19 -08:00
LICENSE anthropic: beta messages integration (#14928) 2023-12-19 18:55:19 -08:00
Makefile anthropic: beta messages integration (#14928) 2023-12-19 18:55:19 -08:00
poetry.lock anthropic: beta messages integration (#14928) 2023-12-19 18:55:19 -08:00
pyproject.toml partners: add license field (#16117) 2024-01-17 08:37:13 -08:00
README.md anthropic: beta messages integration (#14928) 2023-12-19 18:55:19 -08:00

langchain-anthropic