chore: update Docker image comment and improve import handling for CogneeClient
This commit is contained in:
parent
446a378b03
commit
c7ca4c6782
3 changed files with 12 additions and 6 deletions
|
|
@ -1,4 +1,7 @@
|
||||||
from .server import main as server_main
|
try:
|
||||||
|
from .server import main as server_main
|
||||||
|
except ImportError:
|
||||||
|
from server import main as server_main
|
||||||
import warnings
|
import warnings
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,10 @@ from starlette.middleware import Middleware
|
||||||
from starlette.middleware.cors import CORSMiddleware
|
from starlette.middleware.cors import CORSMiddleware
|
||||||
import uvicorn
|
import uvicorn
|
||||||
|
|
||||||
from .cognee_client import CogneeClient
|
try:
|
||||||
|
from .cognee_client import CogneeClient
|
||||||
|
except ImportError:
|
||||||
|
from cognee_client import CogneeClient
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
@ -1088,7 +1091,7 @@ async def main():
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--api-token",
|
"--api-token",
|
||||||
default=None,
|
default=None,
|
||||||
help="Authentication token for the Cognee API. Required if --api-url is provided.",
|
help="Authentication token for the API (optional, required if API has authentication enabled).",
|
||||||
)
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
|
||||||
|
|
@ -503,7 +503,7 @@ def start_ui(
|
||||||
if start_mcp:
|
if start_mcp:
|
||||||
logger.info("Starting Cognee MCP server with Docker...")
|
logger.info("Starting Cognee MCP server with Docker...")
|
||||||
try:
|
try:
|
||||||
image = "cognee/cognee-mcp:feature-standalone-mcp" # TODO: change to main right before merging into main
|
image = "cognee/cognee-mcp:feature-standalone-mcp" # TODO: change to "cognee/cognee-mcp:main" right before merging into main
|
||||||
subprocess.run(["docker", "pull", image], check=True)
|
subprocess.run(["docker", "pull", image], check=True)
|
||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
@ -539,8 +539,8 @@ def start_ui(
|
||||||
docker_cmd.extend(["--env-file", env_file])
|
docker_cmd.extend(["--env-file", env_file])
|
||||||
|
|
||||||
docker_cmd.append(
|
docker_cmd.append(
|
||||||
"cognee/cognee-mcp:feature-standalone-mcp"
|
image
|
||||||
) # TODO: change to main right before merging into main
|
) # TODO: change to "cognee/cognee-mcp:main" right before merging into main
|
||||||
|
|
||||||
mcp_process = subprocess.Popen(
|
mcp_process = subprocess.Popen(
|
||||||
docker_cmd,
|
docker_cmd,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue