New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cohere: Add CohereClient and CohereChatModel to support Chat #917
base: main
Are you sure you want to change the base?
Conversation
Hi @daixi98 thanks a lot! Do you plan to implement |
Hey @langchain4j , my plan was to implement the |
@langchain4j Correct, this change is independent, and can be merged before the integration. I can also start implementing the |
import lombok.NonNull; | ||
|
||
@Builder | ||
public class ChatHistory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: we are now changing the way classes are organized in the modules. Could you please use the following structure (inside the internal
package)?
|
||
String model; | ||
|
||
boolean stream; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason primitives are used in this class?
|
||
List<Map<String, String>> documents; | ||
|
||
boolean isSearchRequired; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason primitives are used in this class?
|
||
String userAccessToken; | ||
|
||
boolean continueOnFailure; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason primitives are used in this class?
@NonNull | ||
String type; | ||
|
||
boolean required; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason primitives are used in this class?
|
||
String errorMessage; | ||
|
||
boolean continueOnFailure; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason primitives are used in this class?
@daixi98 if |
@langchain4j PR updated with the CohereChatModel. |
Context
As the first step of issue #891 , this PR creates a Java client to invoke Cohere Chat API, and a CohereChatModel: https://docs.cohere.com/reference/chat
Change
Checklist
Before submitting this PR, please check the following points:
Checklist for adding new embedding store integration