Skip to content

Commit

Permalink
fix: universal skill selector checks (#164)
Browse files Browse the repository at this point in the history
* fix: universal skill selector checks

* fix: extra var

* feat: selectors test

* fix: check if test will fail

* fix: collect skills

---------

Co-authored-by: Fedor Ignatov <ignatov.fedor@gmail.com>
  • Loading branch information
dilyararimovna and IgnatovFedor committed Dec 14, 2023
1 parent 7c8fd9b commit 1f7b9c7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- name: test multy
run: BOT_PORT=4250 /home/ubuntu/venv/bin/python3 tests/test.py multiskill_ai_assistant

- name: test selectors
run: BOT_PORT=4248 /home/ubuntu/venv/bin/python3 tests/test.py universal_selectors_assistant

- name: Alpha Update Notification
uses: skitionek/notify-microsoft-teams@master
if: steps.alpha_update.outputs.exit_code == 0
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: test multy
run: BOT_PORT=4250 /home/ubuntu/venv/bin/python3 tests/test.py multiskill_ai_assistant

- name: test selectors
run: BOT_PORT=4248 /home/ubuntu/venv/bin/python3 tests/test.py universal_selectors_assistant

- name: Dev Update Notification
uses: skitionek/notify-microsoft-teams@master
if: steps.dev_update.outputs.exit_code == 0
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: test multy
run: BOT_PORT=4250 /home/ubuntu/venv/bin/python3 tests/test.py multiskill_ai_assistant

- name: test selectors
run: BOT_PORT=4248 /home/ubuntu/venv/bin/python3 tests/test.py universal_selectors_assistant

- name: Staging Update Notification
uses: skitionek/notify-microsoft-teams@master
if: steps.staging_update.outputs.exit_code == 0
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ jobs:
./tests/test.sh BOT=multiskill_ai_assistant MODE=test
./tests/test.sh BOT=multiskill_ai_assistant MODE=clean
- name: Build universal_selectors_assistant
run: ./tests/test.sh BOT=universal_selectors_assistant MODE=build

- name: Start universal_selectors_assistant
run: |
./tests/test.sh BOT=universal_selectors_assistant MODE=clean
./tests/test.sh BOT=universal_selectors_assistant MODE=start
- name: Test universal_selectors_assistant
run: |
./tests/test.sh BOT=universal_selectors_assistant MODE=test
./tests/test.sh BOT=universal_selectors_assistant MODE=clean
- name: Universal logs
if: failure()
run: ./tests/test.sh BOT=universal_prompted_assistant MODE=logs
Expand All @@ -61,6 +74,10 @@ jobs:
if: failure()
run: ./tests/test.sh BOT=multiskill_ai_assistant MODE=logs

- name: Selectors logs
if: failure()
run: ./tests/test.sh BOT=universal_selectors_assistant MODE=logs

- name: Cleanup
if: always()
run: |
Expand Down
8 changes: 1 addition & 7 deletions skill_selectors/universal_llm_based_skill_selector/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,10 @@ def select_skills(dialog: dict, prev_active_skills: List[str], prev_used_docs: L
# no matter if we have doc in use now, remove dff_document_qa_llm_skill from skills to be sent to LLM
# in any case, this skill will be added later
# NB: meeting analysis skill is not removed and can be chosen even if there is no doc
all_available_skill_names = [skill for skill in all_skill_names if skill != "dff_document_qa_llm_skill"]

# MODE: debugging skill selector
# TURN ON: all skills & turn on skills selected by LLM via prompt
try:
skills = [
skill
for skill in human_uttr_attributes["skills"]
if skill["name"] in all_available_skill_names and skill["name"] not in DEFAULT_SKILLS
]
skills = [skill for skill in human_uttr_attributes["skills"] if skill["name"] not in DEFAULT_SKILLS]
current_skills_descs_mapping = update_descriptions_from_given_dict(ALL_SKILLS_DESCRIPTIONS_MAPPING, skills)
prompt = _skill_selector.get("prompt", DEFAULT_PROMPT)
if "LIST_OF_AVAILABLE_AGENTS_WITH_DESCRIPTIONS" in prompt:
Expand Down

0 comments on commit 1f7b9c7

Please sign in to comment.