Skip to content

Commit

Permalink
Merge pull request #668 from RasaHQ/update-to-1.0
Browse files Browse the repository at this point in the history
Update to 1.0
  • Loading branch information
indam23 authored Feb 4, 2022
2 parents ead5e16 + 9e8c982 commit ca3b5e6
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 42 deletions.
8 changes: 7 additions & 1 deletion .github/deployments/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ releases:
name: {{ requiredEnv "ACTION_SERVER_SECRET_NAME" }}
key: "ALGOLIA_DOCS_INDEX"
- postgresql:
tag: "12.9.0"
extraEnv:
- name: PGDATA
value: /bitnami/postgresql/data_12
persistence:
existingClaim: {{ requiredEnv "POSTGRES_PVC" }}
- global:
Expand Down Expand Up @@ -93,6 +97,7 @@ releases:
tag: {{ requiredEnv "RASA_VERSION" }}-full
versions:
rasaProduction:
enabled: true
resources:
requests:
memory: {{ .Values.rasaProduction.resources.requests.memory }}
Expand All @@ -111,8 +116,9 @@ releases:
session_persistence: true
rest: {}
- rabbitmq:
rabbitmq:
auth:
password: {{ requiredEnv "RABBITMQ_PASSWORD" }}
erlangCookie: {{ requiredEnv "RABBITMQ_ERLANGCOOKIE" }}
- eventService:
tag: {{ requiredEnv "RASA_X_VERSION" }}
name: {{ requiredEnv "RASA_X_IMAGE_NAME" }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/continuous_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
RASA_X_PVC: ${{ secrets.RASA_X_PVC }}
POSTGRES_PVC: ${{ secrets.POSTGRES_PVC }}
RABBITMQ_PASSWORD: ${{ secrets.RABBITMQ_PASSWORD }}
RABBITMQ_ERLANGCOOKIE: ${{ secrets.RABBITMQ_ERLANGCOOKIE }}
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
RASA_TOKEN: ${{ secrets.RASA_TOKEN }}
RASA_X_TOKEN: ${{ secrets.RASA_X_TOKEN }}
Expand All @@ -39,8 +40,8 @@ env:
# NB! The rasa/rasa-x versions should be in sync with:
# * rasa version in requirements.txt
# * rasa-sdk base image version in Dockerfile
RASA_X_VERSION: "0.42.0"
RASA_VERSION: "2.8.2"
RASA_X_VERSION: "1.0.1"
RASA_VERSION: "2.8.17"
# Due to the issue with openssl library for Google Cloud SDK (gcloud)
# (https://github.com/GoogleCloudPlatform/github-actions/issues/128)
# we use 297.0.01 version
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# * rasa version in requirements.txt
# * RASA_VERSION and RASA_X_VERSION in .github/workflows/continuous-deployment.yml
# Pull SDK image as base image
FROM rasa/rasa-sdk:2.8.0
FROM rasa/rasa-sdk:2.8.3

# Use subdirectory as working directory
WORKDIR /app
Expand Down
4 changes: 1 addition & 3 deletions actions/api/rasaxapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ def get_auth_header(self):
def tag_convo(self, tracker: Tracker, label: Text) -> requests.Response:
"""Tag a conversation in Rasa X with a given label"""
auth_header = self.get_auth_header()
endpoint = (
f"{self.schema}://{self.host}/api/conversations/{tracker.sender_id}/tags"
)
endpoint = f"{self.schema}://{self.host}/api/conversations/{tracker.sender_id}/data-tags"
response = requests.post(url=endpoint, data=label, headers=auth_header)
return response
66 changes: 35 additions & 31 deletions domain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -542,34 +542,37 @@ actions:
- validate_sales_form
forms:
playground_form:
problem_description:
- type: from_text
required_slots:
problem_description:
- type: from_text
suggestion_form:
suggestion:
- type: from_text
required_slots:
suggestion:
- type: from_text
sales_form:
budget:
- entity: amount-of-money
type: from_entity
- entity: number
type: from_entity
- intent: enter_data
type: from_text
business_email:
- entity: email
type: from_entity
- intent: enter_data
type: from_text
company:
- entity: company
type: from_entity
- intent: enter_data
type: from_text
job_function:
- entity: job_function
type: from_entity
- intent: enter_data
type: from_text
required_slots:
budget:
- entity: amount-of-money
type: from_entity
- entity: number
type: from_entity
- intent: enter_data
type: from_text
business_email:
- entity: email
type: from_entity
- intent: enter_data
type: from_text
company:
- entity: company
type: from_entity
- intent: enter_data
type: from_text
job_function:
- entity: job_function
type: from_entity
- intent: enter_data
type: from_text
person_name:
- entity: name
type: from_entity
Expand All @@ -579,9 +582,10 @@ forms:
- intent: enter_data
type: from_text
subscribe_newsletter_form:
email:
- entity: email
type: from_entity
- intent: enter_data
type: from_text
required_slots:
email:
- entity: email
type: from_entity
- intent: enter_data
type: from_text
e2e_actions: []
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rasa==2.8.2 # NB! when updating, make sure to also update:
rasa==2.8.17 # NB! when updating, make sure to also update:
# * rasa-sdk base image in Dockerfile
# * RASA_VERSION and RASA_X_VERSION in .github/workflows/continuous-deployment.yml
-r actions/requirements-actions.txt
Expand Down
5 changes: 4 additions & 1 deletion tests/api/test_rasaxapi.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import requests
from typing import Dict, Text
import logging

from rasa_sdk import Tracker

from actions.api.rasaxapi import RasaXAPI

logger = logging.getLogger(__name__)


def test_get_auth():
rasax = RasaXAPI()
Expand All @@ -24,7 +27,7 @@ def test_tag_convo(
rasax = RasaXAPI()
rasax.tag_convo(tracker, labeldata)
tag_response = requests.get(
f"{rasa_x_conversation_endpoint}/{tracker.sender_id}/tags",
f"{rasa_x_conversation_endpoint}/{tracker.sender_id}/data-tags",
headers=rasa_x_auth_header,
)
actual_tags = [{"value": tag.get("value")} for tag in tag_response.json()]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_action_tag_feedback(
assert actual_events == expected_events

tag_response = requests.get(
f"{rasa_x_conversation_endpoint}/{tracker.sender_id}/tags",
f"{rasa_x_conversation_endpoint}/{tracker.sender_id}/data-tags",
headers=rasa_x_auth_header,
)
actual_tags = [{"value": tag.get("value")} for tag in tag_response.json()]
Expand Down Expand Up @@ -77,7 +77,7 @@ def test_action_tag_docs_search(
assert actual_events == expected_events

tag_response = requests.get(
f"{rasa_x_conversation_endpoint}/{tracker.sender_id}/tags",
f"{rasa_x_conversation_endpoint}/{tracker.sender_id}/data-tags",
headers=rasa_x_auth_header,
)
actual_tags = [{"value": tag.get("value")} for tag in tag_response.json()]
Expand Down

0 comments on commit ca3b5e6

Please sign in to comment.