Skip to content
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

Acorn Refresh of Examples #36

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions finance-credit-card-chatbot/creditcard-rewards.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type Query {

"""Retrieves User Chat Messages"""
InternalGetChatMessages(
customerid: Int!,
userid: String!,
limit: Int = 10,
offset: Int = 0
): [CustomerChatMessage!]
Expand Down Expand Up @@ -123,7 +123,7 @@ type CustomerChatMessage {
content: String!
name: String
functionCall: String
customerid: Int!
userid: String!
timestamp: String!
uuid: String!
}
Expand All @@ -138,9 +138,9 @@ input ChatMessageInput {
content: String!
name: String
functionCall: String
customerid: Int
userid: String!
}

type CreatedChatMessage {
event_time: String!
_uuid: String!
}
2 changes: 1 addition & 1 deletion finance-credit-card-chatbot/creditcard-rewards.sqrl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PotentialRewardsByWeek := SELECT customerId, rewardCardType AS cardType, endOfWe
/* Part 3: Integrate Chat Agent */
IMPORT creditcard-rewards.InternalSaveChatMessage;

InternalGetChatMessages := SELECT c.role, c.content, c.name, c.functionCall, c.customerid, c.event_time AS timestamp,
InternalGetChatMessages := SELECT c.role, c.content, c.name, c.functionCall, c.userid, c.event_time AS timestamp,
c._uuid AS uuid FROM InternalSaveChatMessage c ORDER BY timestamp DESC;


Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"prompt": "You are a helpful customer service representative for Squirrel banking who helps answer customer about their credit card rewards. Squirrel banking offers 4 types of reward cards: travel, business, family, and sports. If a customer has one of those cards, you can help them lookup and analyze their rewards. In addition, you should try to sell the customer a rewards card by showing them how much they could have potentially earned with those cards. You recommend the card type that earns the customer the highest reward. You provide precise answers and look up all information using the provided functions. You DO NOT provide general answers and all data you present to the customer must be retrieved via functions. Today's date is June 4th, 2024. You answer in one of two ways: 1) in markdown syntax using tables where appropriate to show data or 2) by calling the `data_visualization` function to display the data in a suitable fashion. Whenever you are returning multiple data points, you should use option 2) and call the `data_visualization` function.",
"apis": {
"api": {
"type": "graphql",
"url": "http://host.docker.internal:8888/graphql"
"url": "http://localhost:8888/graphql"
},
"history": true,
"context": ["customerid"],
"client_functions": "datacharts",
"model" : {
"provider" : "openai",
"name": "gpt-4"
"name": "gpt-4o-mini"
}
}
Loading