-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
85 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
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 |
---|---|---|
|
@@ -5,11 +5,20 @@ | |
|
||
|
||
class ZendeskAppConfig(BaseSettings): | ||
DISCBOTINTRO: str = ( | ||
"Thank you for reaching out to W&B Technical Support!\n\n" | ||
f"This is an automated reply from our support bot designed to assist you with your WandB-related queries.\n" | ||
f"If you find the solution unsatisfactory or have additional questions, we encourage you to contact our support team at [email protected], or continue replying in this thread\n\n" | ||
) | ||
|
||
ZENDESK_EMAIL: str = (Field(..., env="ZENDESK_EMAIL"),) | ||
ZENDESK_PASSWORD: str = (Field(..., env="ZENDESK_PASSWORD"),) | ||
ZENDESK_SUBDOMAIN: str = (Field(..., env="ZENDESK_SUBDOMAIN"),) | ||
ZDGROUPID: str = ZDGROUPID | ||
WANDBOT_API_URL: AnyHttpUrl = Field(..., env="WANDBOT_API_URL") | ||
MAX_WANDBOT_REQUESTS: int = 5 | ||
REQUEST_INTERVAL: int = 60 | ||
INTERVAL_TO_FETCH_TICKETS: int = 600 | ||
include_sources: bool = True | ||
bot_language: str = "en" | ||
|
||
|
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,13 +1,14 @@ | ||
def discourseExt(description) -> str: | ||
question = description.lower().replace('\n', ' ').replace('\r', '') | ||
question = question.replace('[discourse post]','') | ||
question = question[:4095] | ||
def discourse_ext(description) -> str: | ||
question = description.lower().replace("\n", " ").replace("\r", "") | ||
question = question.replace("[discourse post]", "") | ||
return question | ||
|
||
def offlineMessageExt(description) -> str: | ||
|
||
def offline_msg_ext(description) -> str: | ||
question = description.partition("Offline transcript:")[2] | ||
return question | ||
|
||
def emailMsgExt(description) -> str: | ||
|
||
def email_msg_ext(description) -> str: | ||
# its already clean but returning this for consistency | ||
return description | ||
return description |