MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / start_api_server

Function start_api_server

methods/cognee/api/client.py:175–189  ·  view source on GitHub ↗

Start the API server using uvicorn. Parameters: host (str): The host for the server. port (int): The port for the server.

(host: str = "0.0.0.0", port: int = 8000)

Source from the content-addressed store, hash-verified

173
174
175def start_api_server(host: str = "0.0.0.0", port: int = 8000):
176 """
177 Start the API server using uvicorn.
178 Parameters:
179 host (str): The host for the server.
180 port (int): The port for the server.
181 """
182 try:
183 logger.info("Starting server at %s:%s", host, port)
184
185 uvicorn.run(app, host=host, port=port)
186 except Exception as e:
187 logger.exception(f"Failed to start server: {e}")
188 # Here you could add any cleanup code or error recovery code.
189 raise e
190
191
192if __name__ == "__main__":

Callers 1

client.pyFile · 0.85

Calls 2

infoMethod · 0.65
runMethod · 0.45

Tested by

no test coverage detected