main (examples/openai-server/src/main.cpp)¶
Overview · 14 steps, 7 lanes
All 14 steps
| # | caller | callee | what it does | requirements | frames | call site |
|---|---|---|---|---|---|---|
| 1 | main | open_engine | Initialize the engine handle from the project working directory. | — | — | examples/openai-server/src/main.cpp:749 |
| 2 | open_engine | entropic_create | Create a new engine instance. | REQ-ABI-001 REQ-API-002 REQ-API-003 | if (line 727) | examples/openai-server/src/main.cpp:727 |
| 3 | open_engine | entropic_configure_dir | Configure engine using layered config resolution. | if (line 731) | examples/openai-server/src/main.cpp:731 | |
| 4 | open_engine | entropic_destroy | Destroy an engine instance and free all resources. | REQ-ABI-001 REQ-API-002 REQ-API-003 | if (line 731) | examples/openai-server/src/main.cpp:733 |
| 5 | main | register_routes | Wire all routes onto a configured server instance. | — | — | examples/openai-server/src/main.cpp:752 |
| 6 | register_routes | make_models_listing | Build the /v1/models response from :func: known_models . | — | — | examples/openai-server/src/main.cpp:709 |
| 7 | register_routes | route_chat_completions | Route entry: POST /v1/chat/completions. | — | — | examples/openai-server/src/main.cpp:713 |
| 8 | register_routes | route_completions | Route entry: POST /v1/completions (legacy single-turn). | — | — | examples/openai-server/src/main.cpp:716 |
| 9 | main | entropic_destroy | Destroy an engine instance and free all resources. | REQ-ABI-001 REQ-API-002 REQ-API-003 | — | examples/openai-server/src/main.cpp:755 |
| 10 | entropic_destroy | stop | Stop the accept loop and close the socket. | REQ-BRIDGE-001 | if (line 2300) | src/facade/entropic.cpp:2301 |
| 11 | entropic_destroy | entropic_inference_log_silence | Silence all llama/ggml log output. | — | — | src/facade/entropic.cpp:2305 |
| 12 | entropic_destroy | destroy_orchestrator_interface | Free a context returned by build_orchestrator_interface() . | — | — | src/facade/entropic.cpp:2310 |
| 13 | entropic_destroy | shutdown | Shutdown all servers (in-process + external). | REQ-MCP-006 REQ-MCP-025 | loop (line 2319), if (line 2320) | src/facade/entropic.cpp:2320 |
| 14 | entropic_destroy | unregister_handle_log | gh#59 (v2.3.1): release a handle's session.log file sink. | REQ-TYPE-001 | — | src/facade/entropic.cpp:2329 |
Functions¶
14 functions
mainexamples/openai-server/src/main.cppmake_models_listingexamples/openai-server/src/main.cppopen_engineexamples/openai-server/src/main.cppregister_routesexamples/openai-server/src/main.cpproute_chat_completionsexamples/openai-server/src/main.cpproute_completionsexamples/openai-server/src/main.cppentropic_configure_dirsrc/facade/entropic.cppentropic_createsrc/facade/entropic.cppentropic_destroysrc/facade/entropic.cppstopsrc/facade/external_bridge.cppentropic_inference_log_silencesrc/inference/inference_c_api.cppdestroy_orchestrator_interfacesrc/inference/interface_factory.cppshutdownsrc/mcp/server_manager.cppunregister_handle_logsrc/types/logging.cpp
This diagram as Mermaid · PlantUML · Graphviz DOT
Quick views¶
14 functions, each with its quick view
- main
Program entry — bind to PORT (default 8080) and serve forever.
Map
Show it on the map, in its block's wedge.
Block
examples/openai-server is the block holding
examples/openai-server/src/main.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
No requirement names this function as an implementer.
- make_models_listing
Build the /v1/models response from :func: known_models .
Map
Show it on the map, in its block's wedge.
Block
examples/openai-server is the block holding
examples/openai-server/src/main.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
No requirement names this function as an implementer.
- open_engine
Initialize the engine handle from the project working directory.
Map
Show it on the map, in its block's wedge.
Block
examples/openai-server is the block holding
examples/openai-server/src/main.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
No requirement names this function as an implementer.
- register_routes
Wire all routes onto a configured server instance.
Map
Show it on the map, in its block's wedge.
Block
examples/openai-server is the block holding
examples/openai-server/src/main.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
No requirement names this function as an implementer.
- route_chat_completions
Route entry: POST /v1/chat/completions.
Map
Show it on the map, in its block's wedge.
Block
examples/openai-server is the block holding
examples/openai-server/src/main.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
No requirement names this function as an implementer.
- route_completions
Route entry: POST /v1/completions (legacy single-turn).
Map
Show it on the map, in its block's wedge.
Block
examples/openai-server is the block holding
examples/openai-server/src/main.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
No requirement names this function as an implementer.
- entropic_configure_dir
Configure using layered resolution (project dir).
Map
Show it on the map, in its block's wedge.
Block
src/facade is the block holding
src/facade/entropic.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
- entropic_create
Create a new engine instance.
Map
Show it on the map, in its block's wedge.
Block
src/facade is the block holding
src/facade/entropic.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
- entropic_destroy
Destroy an engine instance.
Map
Show it on the map, in its block's wedge.
Block
src/facade is the block holding
src/facade/entropic.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
- stop
Stop the accept loop and close the socket.
Map
Show it on the map, in its block's wedge.
Block
src/facade is the block holding
src/facade/external_bridge.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
- entropic_inference_log_silence
Silence all llama/ggml output.
Map
Show it on the map, in its block's wedge.
Block
src/inference is the block holding
src/inference/inference_c_api.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
No requirement names this function as an implementer.
- destroy_orchestrator_interface
Free a context returned by build_orchestrator_interface() .
Map
Show it on the map, in its block's wedge.
Block
src/inference is the block holding
src/inference/interface_factory.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
Reqs
No requirement names this function as an implementer.
- shutdown
Shutdown all servers (in-process + external).
Map
Show it on the map, in its block's wedge.
Block
src/mcp is the block holding
src/mcp/server_manager.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs
- unregister_handle_log
gh#59 (v2.3.1): release a handle's session.log file sink.
Map
Show it on the map, in its block's wedge.
Block
src/types is the block holding
src/types/logging.cpp.Flow
Replay
No recorded run reaches this function.
Source
Its page: signature, body, callers and callees. Its activity diagram.
Tests
No test calls this function directly.
Reqs