MCPcopy
hub / github.com/PromtEngineer/localGPT / do_POST

Method do_POST

rag_system/api_server.py:124–135  ·  view source on GitHub ↗

Handle POST requests for chat and indexing.

(self)

Source from the content-addressed store, hash-verified

122 self.end_headers()
123
124 def do_POST(self):
125 """Handle POST requests for chat and indexing."""
126 parsed_path = urlparse(self.path)
127
128 if parsed_path.path == '/chat':
129 self.handle_chat()
130 elif parsed_path.path == '/chat/stream':
131 self.handle_chat_stream()
132 elif parsed_path.path == '/index':
133 self.handle_index()
134 else:
135 self.send_json_response({"error": "Not Found"}, status_code=404)
136
137 def do_GET(self):
138 parsed_path = urlparse(self.path)

Callers

nothing calls this directly

Calls 4

handle_chatMethod · 0.95
handle_chat_streamMethod · 0.95
handle_indexMethod · 0.95
send_json_responseMethod · 0.95

Tested by

no test coverage detected