[Chore] Cleaning up and consolidating client code
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reviewing the GenericOpenAIAgent pattern and the earlier PR 145, then inventory the client APIs, print statements, logging, and exception handling described here. Confirm scope with maintainers before changing anything; done should be a non-breaking, explicitly scoped consolidation rather than an open-ended client rewrite.
Written by the indexing model from the issue text.
Description
A lot of clients use repeated patterns and inconsistent type hints that could possibly be consolidated in same way that was done with the GenericOpenAIAgent without causing breaking changes. I am opening this issue as a catch-all issue to take feedback from the maintainers about what they think could be consolidated and what are parts we definitely wouldn't want to touch. An earlier PR touches on this a little bit. Perhaps you would want an agent to go through and identify patterns? What would be the best way forward?
A very natural first step could be to open a PR to update the type annotations of apis from str to Mapping[str, any)
A second step could be to clean out the print statements and use the project's standard logging approach, and to clean up the exception handling within the clients.
Then we could look into consolidating the client code into a parent class with reused functions and have these clients inherit that parent class.
- Dominant language
- Python
- Stars
- 989
- Forks
- 176
- Avg merge
- 7d 15h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/AIOpsLab
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in microsoft/AIOpsLab
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/skills#1811 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
speaches-ai/speaches#678 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
datalayer/mcp-compose#42 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
UKGovernmentBEIS/inspect_evals#2523 ·