- Added utility function "read_input_content_from_file_or_string" to pypacter-cli/src/pypacter_cli/util.py file.
- This function returns the file content if filename is provided as argument otherwise returns the input itself.
- Added detect_language function to src/pypacter/language_detector.py file
- In this function called GPT_4.invoke(prompt) to invoke the gpt4 model and provided the input prompt to identify the programming language.
- Used already initialised GPT_4 instance in models.py file.
- Added unit test cases in tests/test_language_detector.py file.
Added /detect-language api endpoint to pypacter-api/src/pypacter_api/base.py file.
- This api extract the input from request_body
- Calls the detect_language function from core package to get the output.
- Convert and returns the output in json using JSONResponse object
- Added call_detect_language_api function to pypacter-cli/src/pypacter_cli/init.py file to api endpoint to get the output
- Added process_input function to pypacter-cli/src/pypacter_cli/init.py file as cli command to take input from user and process the input and returns the output to cli.
- Added the requirements.txt file.