-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Linked issues closes: #54 - Update docstrings for PromptManager.ts - Add unit tests for PromptManager.ts New JS coverage: 74.63 ## Attestation Checklist - [x] My code follows the style guidelines of this project - I have checked for/fixed spelling, linting, and other errors - I have commented my code for clarity - I have made corresponding changes to the documentation (updating the doc strings in the code is sufficient) - My changes generate no new warnings - I have added tests that validates my changes, and provides sufficient test coverage. I have tested with: - Local testing - E2E testing in Teams - New and existing unit tests pass locally with my changes Co-authored-by: Corina Gum <>
- Loading branch information
Showing
10 changed files
with
324 additions
and
44 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
js/packages/teams-ai/src/internals/testing/assets/test/README.md
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 @@ | ||
The files in this folder `/test` are used for unit tests in `PromptManager.spec.ts`. The files in this folder are not used in the actual package. |
16 changes: 16 additions & 0 deletions
16
js/packages/teams-ai/src/internals/testing/assets/test/missingConfig/actions.json
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 @@ | ||
[ | ||
{ | ||
"name": "SendCard", | ||
"description": "Sends an adaptive card to the user", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"card": { | ||
"type": "object", | ||
"description": "The adaptive card to send" | ||
} | ||
}, | ||
"required": ["card"] | ||
} | ||
} | ||
] |
1 change: 1 addition & 0 deletions
1
js/packages/teams-ai/src/internals/testing/assets/test/missingConfig/skprompt.txt
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 @@ | ||
You are a friendly assistant for Microsoft Teams. |
16 changes: 16 additions & 0 deletions
16
js/packages/teams-ai/src/internals/testing/assets/test/missingPrompt/actions.json
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 @@ | ||
[ | ||
{ | ||
"name": "SendCard", | ||
"description": "Sends an adaptive card to the user", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"card": { | ||
"type": "object", | ||
"description": "The adaptive card to send" | ||
} | ||
}, | ||
"required": ["card"] | ||
} | ||
} | ||
] |
21 changes: 21 additions & 0 deletions
21
js/packages/teams-ai/src/internals/testing/assets/test/missingPrompt/config.json
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,21 @@ | ||
{ | ||
"schema": 1.1, | ||
"description": "A bot that can manage a list of work items.", | ||
"type": "completion", | ||
"completion": { | ||
"model": "gpt-3.5-turbo", | ||
"completion_type": "chat", | ||
"include_history": true, | ||
"include_input": true, | ||
"max_input_tokens": 2800, | ||
"max_tokens": 1000, | ||
"temperature": 0.2, | ||
"top_p": 0.0, | ||
"presence_penalty": 0.6, | ||
"frequency_penalty": 0.0, | ||
"stop_sequences": [] | ||
}, | ||
"augmentation": { | ||
"augmentation_type": "monologue" | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
js/packages/teams-ai/src/internals/testing/assets/test/unknown/actions.json
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 @@ | ||
[ | ||
{ | ||
"name": "SendCard", | ||
"description": "Sends an adaptive card to the user", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"card": { | ||
"type": "object", | ||
"description": "The adaptive card to send" | ||
} | ||
}, | ||
"required": ["card"] | ||
} | ||
} | ||
] |
21 changes: 21 additions & 0 deletions
21
js/packages/teams-ai/src/internals/testing/assets/test/unknown/config.json
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,21 @@ | ||
{ | ||
"schema": 1.1, | ||
"description": "A bot that can manage a list of work items.", | ||
"type": "completion", | ||
"completion": { | ||
"model": "gpt-3.5-turbo", | ||
"completion_type": "chat", | ||
"include_history": true, | ||
"include_input": true, | ||
"max_input_tokens": 2800, | ||
"max_tokens": 1000, | ||
"temperature": 0.2, | ||
"top_p": 0.0, | ||
"presence_penalty": 0.6, | ||
"frequency_penalty": 0.0, | ||
"stop_sequences": [] | ||
}, | ||
"augmentation": { | ||
"augmentation_type": "monologue" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
js/packages/teams-ai/src/internals/testing/assets/test/unknown/skprompt.txt
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 @@ | ||
You are a friendly assistant for Microsoft Teams. |
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.