mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-12 00:11:17 +00:00
docs: update cohere chat integration (#15562)
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user