Skip to content

Commit

Permalink
Progress bar for learn_from_user_feedback (#776)
Browse files Browse the repository at this point in the history
* Use tqdm to report progress in learn_from_user_feedback()

* Update contrib-openai.yml

Append `pytest-asyncio` to `pip install coverage` for TeachableAgent.

* Replace pytest-asyncio with pytest

* Temporary usage of pull_request action.

* Restore pull_request_target action.
  • Loading branch information
rickyloynd-microsoft authored Nov 29, 2023
1 parent f812a23 commit f96963e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contrib-openai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
python -m pip install --upgrade pip wheel
pip install -e .[teachable]
python -c "import autogen"
pip install coverage
pip install coverage pytest
- name: Coverage
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions autogen/agentchat/contrib/teachable_agent.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import os
from autogen import oai
from autogen.agentchat.agent import Agent
from autogen.agentchat.assistant_agent import ConversableAgent
from autogen.agentchat.contrib.text_analyzer_agent import TextAnalyzerAgent
from typing import Callable, Dict, Optional, Union, List, Tuple, Any
import chromadb
from chromadb.config import Settings
import pickle
from tqdm import tqdm


try:
Expand Down Expand Up @@ -133,7 +133,7 @@ def learn_from_user_feedback(self):
print(colored("\nREVIEWING CHAT FOR USER TEACHINGS TO REMEMBER", "light_yellow"))
# Look at each user turn.
if len(self.user_comments) > 0:
for comment in self.user_comments:
for comment in tqdm(self.user_comments):
# Consider whether to store something from this user turn in the DB.
self.consider_memo_storage(comment)
self.user_comments = []
Expand Down

0 comments on commit f96963e

Please sign in to comment.