Skip to content

Commit

Permalink
Prompting Updates, slight reorg on SMS functions
Browse files Browse the repository at this point in the history
  • Loading branch information
docwho2 committed Aug 5, 2024
1 parent 1d3cfe7 commit d8517e0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion ChatGPT/src/main/java/cloud/cleo/squareup/ChatGPTLambda.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public abstract class ChatGPTLambda {
public final static String FACEBOOK_HANDOVER_FUNCTION_NAME = "facebook_inbox";
public final static String SWITCH_LANGUAGE_FUNCTION_NAME = "switch_language";
public final static String DRIVING_DIRECTIONS_FUNCTION_NAME = "driving_directions";
public final static String PRIVATE_SHOOPING_FUNCTION_NAME = "private_shopping_url";
public final static String PRIVATE_SHOPPING_FUNCTION_NAME = "private_shopping_url";


public final static String WEBSITE_URL = "CopperFoxGifts.com";
Expand Down Expand Up @@ -170,6 +170,8 @@ protected LexV2Response processGPT(LexV2EventWrapper lexRequest) {
FunctionExecutor functionExecutor = AbstractFunction.getFunctionExecuter(lexRequest);
functionExecutor.setObjectMapper(mapper);

functionExecutor.getFunctions().forEach(f -> log.debug(f));

while (true) {
final var chatMessages = session.getChatMessages();
ChatCompletionRequest request = ChatCompletionRequest.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static cloud.cleo.squareup.ChatGPTLambda.DRIVING_DIRECTIONS_FUNCTION_NAME;
import static cloud.cleo.squareup.ChatGPTLambda.HANGUP_FUNCTION_NAME;
import static cloud.cleo.squareup.ChatGPTLambda.PRIVATE_SHOOPING_FUNCTION_NAME;
import static cloud.cleo.squareup.ChatGPTLambda.SWITCH_LANGUAGE_FUNCTION_NAME;
import static cloud.cleo.squareup.ChatGPTLambda.TRANSFER_FUNCTION_NAME;
import static cloud.cleo.squareup.ChatGPTLambda.WEBSITE_URL;
Expand All @@ -19,6 +18,7 @@
import java.util.stream.Collectors;
import lombok.Data;
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.*;
import static cloud.cleo.squareup.ChatGPTLambda.PRIVATE_SHOPPING_FUNCTION_NAME;

/**
* Object to store and accumulate ChatGPT Session Data (messages) in DynamoDB.
Expand Down Expand Up @@ -82,7 +82,7 @@ public ChatGPTSessionState(LexV2EventWrapper lexRequest) {
Do mention how great it would be to have the store all to themselves and how we try to accomodate all requests.
""");

sb.append("Please call the ").append(PRIVATE_SHOOPING_FUNCTION_NAME)
sb.append("Please call the ").append(PRIVATE_SHOPPING_FUNCTION_NAME)
.append("""
function to get the direct booking URL when the caller is interested in the private shopping experience. This is
really one of the more innovative services we provide and we want to ensure its as easy as possible for customers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/
package cloud.cleo.squareup.functions;

import static cloud.cleo.squareup.ChatGPTLambda.PRIVATE_SHOOPING_FUNCTION_NAME;
import static cloud.cleo.squareup.ChatGPTLambda.WEBSITE_URL;
import static cloud.cleo.squareup.ChatGPTLambda.PRIVATE_SHOPPING_FUNCTION_NAME;

/**
*
Expand All @@ -18,7 +18,7 @@ public abstract class PrivateShoppingLink<Request> extends AbstractFunction {

@Override
public final String getName() {
return PRIVATE_SHOOPING_FUNCTION_NAME;
return PRIVATE_SHOPPING_FUNCTION_NAME;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*/
package cloud.cleo.squareup.functions;

import static cloud.cleo.squareup.functions.AbstractFunction.mapper;
import java.util.function.Function;

/**
*
* @author sjensen
*/
public class PrivateShoppingLinkText extends PrivateShoppingLink {

@Override
protected String getDescription() {
return "Returns a URL for direct booking of Private Shopping";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
package cloud.cleo.squareup.functions;

import static cloud.cleo.squareup.functions.AbstractFunction.mapper;
import java.util.function.Function;

/**
Expand Down

0 comments on commit d8517e0

Please sign in to comment.