-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support custom models #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…c, ollama with codellama)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 20 changed files in this pull request and generated 1 comment.
Files not reviewed (14)
- api-keys.env.template: Language not supported
- py-src/data_formulator/agents/agent_utils.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_rec.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_clean.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_generic_py_concept.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_filter.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_sort_data.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_concept_derive.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_py_concept_derive.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_transformation.py: Evaluated as low risk
- src/views/EncodingShelfThread.tsx: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_load.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_code_explanation.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_transform_v2.py: Evaluated as low risk
Comments suppressed due to low confidence (3)
py-src/data_formulator/app.py:38
- [nitpick] The class name 'Client' is too generic and could lead to confusion. It should be renamed to something more specific like 'LiteLLMClient'.
from data_formulator.agents.client_utils import Client
py-src/data_formulator/app.py:132
- The function 'check_available_models' does not have any associated tests to verify its behavior. This function is critical as it checks the availability of models and should be covered by tests to ensure it works correctly under different scenarios.
@app.route('/check-available-models', methods=['GET', 'POST'])
src/app/dfSlice.tsx:695
- The
domainvariable is assigneduniqueValues, but the comment suggests it should beArray.from(columnValues). Confirm if the intended behavior is to use unique values or all column values.
const domain = uniqueValues; //Array.from(columnValues);
| app = Flask(__name__, static_url_path='', static_folder=os.path.join(APP_ROOT, "dist")) | ||
| CORS(app) | ||
|
|
||
| def get_client(model_config): |
Copilot
AI
Feb 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'html.escape' function is used to escape all values in 'model_config', which might not be necessary or appropriate for all fields (e.g., 'api_key'). This could lead to unintended behavior if the API key or other fields contain characters that are escaped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 11 out of 26 changed files in this pull request and generated 3 comments.
Files not reviewed (15)
- api-keys.env.template: Language not supported
- py-src/data_formulator/agents/agent_utils.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_clean.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_generic_py_concept.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_py_concept_derive.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_filter.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_concept_derive.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_sort_data.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_load.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_transformation.py: Evaluated as low risk
- py-src/data_formulator/agents/agent_code_explanation.py: Evaluated as low risk
- src/views/EncodingBox.tsx: Evaluated as low risk
- src/views/DataFormulator.tsx: Evaluated as low risk
- src/app/dfSlice.tsx: Evaluated as low risk
- py-src/data_formulator/agents/agent_data_rec.py: Evaluated as low risk
Comments suppressed due to low confidence (1)
py-src/data_formulator/app.py:55
- The function should have test coverage to ensure that it correctly handles different model configurations and creates the Client instance with the appropriate parameters.
def get_client(model_config):
| print("\n=== Data transformation result ===>\n") | ||
| print(choice.message.content + "\n") | ||
|
|
Copilot
AI
Feb 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace print statements with proper logging.
| print("\n=== Data transformation result ===>\n") | |
| print(choice.message.content + "\n") | |
| logger.info("\n=== Data transformation result ===>\n") | |
| logger.info(choice.message.content + "\n") |
| print("\n=== Code blocks ===>\n") | ||
| print(code_blocks) | ||
|
|
Copilot
AI
Feb 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace print statements with proper logging.
| print("\n=== Code blocks ===>\n") | |
| print(code_blocks) | |
| logger.info("\n=== Code blocks ===>\n") | |
| logger.info(code_blocks) |
| print("\n=== Candidates ===>\n") | ||
| print(candidates) | ||
|
|
Copilot
AI
Feb 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace print statements with proper logging.
| print("\n=== Candidates ===>\n") | |
| print(candidates) | |
| logger.info("\n=== Candidates ===>\n") | |
| logger.info(candidates) |
Support running models beyond open ai models
api-keys.env, checkout https://github.com/microsoft/data-formulator/blob/dev/api-keys.env.template. Data Formulator will test and load them into the tool on start.