-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:beckn/beckn-action-bot into feat/cr…
…eate_control_center
- Loading branch information
Showing
21 changed files
with
1,225 additions
and
1,779 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Run api tests | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
jobs: | ||
test-lint: | ||
name: API tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up environment variables | ||
run: | | ||
echo "OPENAI_AI_KEY=${{secrets.OPENAI_AI_KEY}}" >> .env | ||
echo "OPENAI_MODEL_ID=${{secrets.OPENAI_MODEL_ID}}" >> .env | ||
echo "OPEN_AI_EMBEDDINGS_MODEL=${{secrets.OPEN_AI_EMBEDDINGS_MODEL}}" >> .env | ||
echo "PORT=${{secrets.PORT}}" >> .env | ||
echo "SERVER_PORT=${{secrets.SERVER_PORT}}" >> .env | ||
echo "TWILIO_ACCOUNT_SID=${{secrets.TWILIO_ACCOUNT_SID}}" >> .env | ||
echo "TWILIO_AUTH_TOKEN=${{secrets.TWILIO_AUTH_TOKEN}}" >> .env | ||
echo "TWILIO_NUMBER=${{secrets.TWILIO_NUMBER}}" >> .env | ||
echo "TEST_RECEPIENT_NUMBER=${{secrets.TEST_RECEPIENT_NUMBER}}" >> .env | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run api tests | ||
run: npm run docker:test:apis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Run unit tests | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
jobs: | ||
test-lint: | ||
name: Unit tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up environment variables | ||
run: | | ||
echo "OPENAI_AI_KEY=${{secrets.OPENAI_AI_KEY}}" >> .env | ||
echo "OPENAI_MODEL_ID=${{secrets.OPENAI_MODEL_ID}}" >> .env | ||
echo "OPEN_AI_EMBEDDINGS_MODEL=${{secrets.OPEN_AI_EMBEDDINGS_MODEL}}" >> .env | ||
echo "PORT=${{secrets.PORT}}" >> .env | ||
echo "SERVER_PORT=${{secrets.SERVER_PORT}}" >> .env | ||
echo "TWILIO_ACCOUNT_SID=${{secrets.TWILIO_ACCOUNT_SID}}" >> .env | ||
echo "TWILIO_AUTH_TOKEN=${{secrets.TWILIO_AUTH_TOKEN}}" >> .env | ||
echo "TWILIO_NUMBER=${{secrets.TWILIO_NUMBER}}" >> .env | ||
echo "TEST_RECEPIENT_NUMBER=${{secrets.TEST_RECEPIENT_NUMBER}}" >> .env | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run unit tests | ||
run: npm run docker:test:unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,16 @@ | ||
{ | ||
"SUPPORTED_ACTIONS": [ | ||
{ "key": "search", "description": "Perform a search" }, | ||
{ "key": "select", "description": "The instruction declares the customer's cart (or equivalent) created by selecting objects from the catalog. This is equivalent of adding items to cart (or equivalent) by selecting them." }, | ||
{ "key": "init", "description": "Initialize an order by providing billing and/or shipping details." }, | ||
{ "key": "confirm", "description": "Confirm an action" }, | ||
{ "key": "status", "description": "Get the status of an action" }, | ||
{ "key": "track", "description": "Track an action" }, | ||
{ "key": "cancel", "description": "Cancel an action" }, | ||
{ "key": "update", "description": "Update an action" }, | ||
{ "key": "rating", "description": "Provide a rating" }, | ||
{ "key": "support", "description": "Get support" } | ||
], | ||
"SUPPORTED_DOMAINS": [ | ||
{"key": "uei:charging", "description": "Used for energy transactions"} | ||
{ "action": "search", "description": "Perform a search for a service or product. If a service or product is not specified, its not a search. Listing all bookings is not a search." }, | ||
{ "action": "select", "description": "If the user likes or selects any item, this action should be used." }, | ||
{ "action": "init", "description": "If the user wants to place an order after search and select and has shared the billing details." }, | ||
{ "action": "confirm", "description": "Confirm an order. This action gets called when users confirms an order." }, | ||
{ "action": "clear", "description": "If the user wants to clear the session or restart session or chat." } | ||
], | ||
"SCHEMA_TRANSLATION_CONTEXT": [ | ||
{ "role": "system", "content": "Your job is to identify the endpoint, method and request body from the given schema, based on the last user input and return the extracted details in the following JSON structure : \n\n {'url':'', 'method':'', 'body':''}'"}, | ||
{ "role": "system", "content": "A typical order flow should be search > select > init > confirm."}, | ||
{ "role": "system", "content": "Auto-generate uuid wherever required and should be a valid uuid such as ."}, | ||
{ "role": "system", "content": "Use the context to identify the transaction id returned in search api response and use it in subsequent api calls."}, | ||
{ "role": "system", "content": "Use the response of search from assistant to select items from the list of items provided by the assistant."}, | ||
{ "role": "system", "content": "Use the response of search request from assistant for filling transaction_id, bpp_id, bpp_uri in the context of all calls except `search`."}, | ||
{ "role": "system", "content": "Use the response from assistant to select items from the list of items provided by the assistant."} | ||
|
||
], | ||
"PRESETS" : { | ||
"bap_id": "mit-ps-bap.becknprotocol.io", | ||
"bap_uri": "https://mit-ps-bap.becknprotocol.io", | ||
"version": "1.1.0", | ||
"base_url": "https://mit-ps-bap-client.becknprotocol.io" | ||
} | ||
{ "role": "system", "content": "For `select`, `init`, `confirm`, you must use the item `id` as part of the payload for selected item instead of name or any other key."} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[ | ||
{ | ||
"url": "https://mit-ps-bap-client.becknprotocol.io", | ||
"domains": [ | ||
"uei:charging", | ||
"retail:1.1.0", | ||
"hospitality", | ||
"dhp:consultation:0.1.0", | ||
"tourism" | ||
], | ||
"description": "This network supports multiple domains e.g. uei:charging for ev chargers, retail:1.1.0 for retail stores including grocceries and pet supplies, hospitality for hotels, dhp:consultation:0.1.0 for doctors or healthcare, tourism for tickets and tours", | ||
"bap_subscriber_id": "mit-ps-bap.becknprotocol.io", | ||
"bap_subscriber_url": "https://mit-ps-bap.becknprotocol.io", | ||
"version": "1.1.0" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.