-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Refactor Options #406
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
Refactor Options #406
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,12 @@ | |
|
||
import java.util.List; | ||
import java.util.Set; | ||
import org.springframework.ai.chat.prompt.ChatOptions; | ||
|
||
/** | ||
* @author Christian Tzolov | ||
*/ | ||
public interface FunctionCallingOptions { | ||
public interface FunctionCallingOptions extends ChatOptions { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FunctionCallingOptions not extending ChatOptions was intentional in order to provide support finer grained support of what features can be opted into. Also, the code didn't compile after this change, so be sure to do a compilation of the total project before submitting a PR please. |
||
|
||
/** | ||
* Function Callbacks to be registered with the ChatClient. For Prompt Options the | ||
|
@@ -34,33 +35,10 @@ public interface FunctionCallingOptions { | |
*/ | ||
List<FunctionCallback> getFunctionCallbacks(); | ||
|
||
/** | ||
* Set the Function Callbacks to be registered with the ChatClient. | ||
* @param functionCallbacks the Function Callbacks to be registered with the | ||
* ChatClient. | ||
*/ | ||
void setFunctionCallbacks(List<FunctionCallback> functionCallbacks); | ||
|
||
/** | ||
* @return List of function names from the ChatClient registry to be used in the next | ||
* chat completion requests. | ||
*/ | ||
Set<String> getFunctions(); | ||
|
||
/** | ||
* Set the list of function names from the ChatClient registry to be used in the next | ||
* chat completion requests. | ||
* @param functions the list of function names from the ChatClient registry to be used | ||
* in the next chat completion requests. | ||
*/ | ||
void setFunctions(Set<String> functions); | ||
|
||
/** | ||
* @return Returns FunctionCallingOptionsBuilder to create a new instance of | ||
* FunctionCallingOptions. | ||
*/ | ||
public static FunctionCallingOptionsBuilder builder() { | ||
return new FunctionCallingOptionsBuilder(); | ||
} | ||
|
||
} |
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.
removing these setters also required to remove the
@Override
annotations on all implementing classes. As a result the project didn't compile. Please make sure the changes you make compile before sending a PR.