สร้างรหัสสำหรับคำอธิบายโปรแกรมที่ผู้ใช้ร้องขอโดยใช้ Azure OpenAI API GPT-3.5-turbo
การเปลี่ยนแปลง/การเพิ่มรหัสจะถูกเพิ่มตามแบบต่อเมนู-API-API
หากโปรแกรมพุ่งเข้ามาเมื่อรันข้อผิดพลาดในการบันทึกจะถูกส่งไปยังรุ่น GPT รหัสหรือข้อความ Davinci สำหรับการดีบัก

Repo file structure:
.
├── config_dir #file configuration
├── config.json #project files, paths, token limits metadata
├── config.py #set by user API, model, temperature for each request
├── credentials #credentials folder for OpenAI API
│ └── self_config.py #Azure OpenAI API credentials & model names metadata
#Move sample_self_config.py to self_config.py and fill data
├── emu_cli.py #run this module to run the program
├── feature_common.py #common methods for feature requests to API
├── feature_manager.py #manager for each feature requested by user in the menu
├── ft_operations #non-API requests directory
│ ├── op_loadcode.py #loads code from local file to apply code change requests to it
│ ├── op_run_program.py #run the code
├── ft_requests #feature text requests directory
│ ├── feature_request_argparse.py #standard add argparse request
│ ├── feature_request_custom_req.py #user enters custom system and request prompt
│ ├── feature_request_debuglogs.py #send logs from running the program to API to debug error found in logs
│ ├── feature_request_docstrings.py #add docstrings
│ ├── feature_request_excpt_and_log.py #add exception handling and logs to the code
│ ├── feature_request_rawcode.py #generate initial code from a program description
├── log_list_handler.py
├── project #project output directory
│ ├── module.log
│ ├── module.py #code requested stored here and versioned
├── prompt_txt #prompt specs directory for each request
│ ├── clean_json_rq.py
│ ├── custom_req.py
│ ├── debug_rq.py
│ ├── docstrings_rq.py
│ ├── error_hndl_logging_rq.py
│ ├── input_and_argparse_rq.py
│ ├── raw_code_rq.py
├── README.md
├── requirements.txt
├── sample_self_config.py
├── tools #file and request management utilities directory
│ ├── file_management.py
│ └── request_utils.py
├── user_interaction.py #user interaction class
Python v3.10+ Python ที่ต้องการแพ็คเกจที่ต้องการ: ดู chendrees.txt เพิ่มแพ็คเกจนี้ลงใน sys.path ของคุณ
จำเป็นต้องเปลี่ยนเส้นทาง: เปลี่ยนเส้นทางไปยังสภาพแวดล้อม Python ของคุณที่ config.json: เช่น "python_env_path": "/home/sergio/anaconda3/bin/python" สำหรับเส้นทางของค่า Env ปัจจุบันเป็น "Python"
การรับรองความถูกต้อง: สร้างไดเรกทอรี "เครดิต" ที่รูทของโครงการนี้และบันทึกในตัวอย่าง _Self_Config.py เปลี่ยนชื่อไฟล์ py นี้เป็น self_config.py และป้อนจุดปลายของคุณชื่อรุ่น/การปรับใช้และปุ่ม โครงการทดสอบด้วย Azure Openai API Openai API ที่ยังไม่ผ่านการทดสอบ
การกำหนดค่าโมเดล OpenAI และอุณหภูมิต่อคำขอ:
การดำเนินการของโปรแกรมนี้: ที่บรรทัดคำสั่ง/emu_cli.py แสดงเมนู:
1. Generate Raw Code
Request model for code according to a description you provide.
2. Load Raw Code Script From File
3. Add Argparse
4. Exception Handling and Logging
5. User Custom Request
Requirement: code to be already loaded. Expected JSON response as specified in custom_req.py json_required_format variable.
6. Run Program And Request Repair of Debug Logs
Run the program and upon errors send the log error captured for the model to amend the code accordingly.
7. Add Docstrings To Program Code.
8. Set Menu Sequence
9. Run All
10. Exit
Choose your request:
สลับเพื่อแสดงพรอมต์สำหรับแต่ละคำขอ: ที่ config_dir/config.py toggle bool show_request
หากคุณพบว่ามีประโยชน์คุณสามารถซื้อกาแฟให้ฉันได้ :)