docs: update cohere chat integration (#15562)

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
This commit is contained in:
Bagatur
2024-01-05 19:33:29 -05:00
committed by GitHub
parent 1bc6b19ea7
commit c5226d7a18
8 changed files with 866 additions and 335 deletions

View File

@@ -105,9 +105,10 @@ class ChatCohere(BaseChatModel, BaseCohere):
from langchain_community.chat_models import ChatCohere
from langchain_core.messages import HumanMessage
chat = ChatCohere(model="foo")
result = chat([HumanMessage(content="Hello")])
print(result.content)
chat = ChatCohere(model="command", max_tokens=256, temperature=0.75)
messages = [HumanMessage(content="knock knock")]
chat.invoke(messages)
"""
class Config: