(chat_history: List[Tuple[str, str]])
| 12 | |
| 13 | |
| 14 | def _format_chat_history(chat_history: List[Tuple[str, str]]): |
| 15 | buffer = [] |
| 16 | for human, ai in chat_history: |
| 17 | buffer.append(HumanMessage(content=human)) |
| 18 | buffer.append(AIMessage(content=ai)) |
| 19 | return buffer |
| 20 | |
| 21 | |
| 22 | model = ChatAnthropic(model="claude-3-sonnet-20240229") |
no test coverage detected