-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
24 lines (23 loc) · 807 Bytes
/
main.cpp
File metadata and controls
24 lines (23 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "core/llm_talker.cpp"
#include "core/file_parser.hpp"
#include <iostream>
int main() {
std::string model_name{"qwen2.5-coder"};
std::string user_query;
// std::cout<<"\nModel :";
// std::cin>>model_name;
std::cout << "\nPress Enter to input prompt..." << std::endl;
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
std::cout << ">>";
std::getline(std::cin, user_query, ';');
user_query.erase(user_query.find_last_not_of(" \n\r\t") + 1);
if (!user_query.empty()) {
std::cout << "\ngenerating..." << std::endl;
talker(model_name, user_query);
std::cout<<"\nAttempting Parsing..." <<std::endl;
extract_and_save_response("model_output.json", "response.txt");
} else {
std::cout << "Empty prompt: exiting..." << std::endl;
}
return 0;
}