First commit

This commit is contained in:
aliakbar
2026-06-25 21:21:30 +03:30
parent 55d33677d9
commit 5c34cef2c3
147 changed files with 7197 additions and 0 deletions
@@ -0,0 +1,13 @@
class ChatResponse {
final String finalAnswer;
final Map<String, String> rawResponses;
ChatResponse({required this.finalAnswer, required this.rawResponses});
factory ChatResponse.fromJson(Map<String, dynamic> json) {
return ChatResponse(
finalAnswer: json['final_answer'],
rawResponses: Map<String, String>.from(json['raw_responses']),
);
}
}
@@ -0,0 +1,15 @@
class Device {
final String ip;
final int port;
Device({required this.ip, required this.port});
factory Device.fromJson(Map<String, dynamic> json) {
return Device(
ip: json['ip'],
port: json['port'],
);
}
String get address => '$ip:$port';
}
@@ -0,0 +1,13 @@
class DocumentInfo {
final String docId;
final int chunks;
DocumentInfo({required this.docId, required this.chunks});
factory DocumentInfo.fromJson(Map<String, dynamic> json) {
return DocumentInfo(
docId: json['doc_id'],
chunks: json['chunks'],
);
}
}
@@ -0,0 +1,15 @@
class UploadResponse {
final String message;
final String docId;
final int chunksIndexed;
UploadResponse({required this.message, required this.docId, required this.chunksIndexed});
factory UploadResponse.fromJson(Map<String, dynamic> json) {
return UploadResponse(
message: json['message'],
docId: json['doc_id'],
chunksIndexed: json['chunks_indexed'],
);
}
}