Rename project: maxclaw → langcode
- Renamed all references from maxclaw to langcode across all files - Renamed maxclaw.py → langcode.py - Renamed completion scripts: maxclaw.bash/zsh → langcode.bash/zsh - Updated Dockerfile, README, all Python files, HTML, JSON, YAML - New Gitea repository: http://192.168.0.183:8085/truetype/langcode_agent.git
This commit is contained in:
1 parent
0612b290d5
commit
eda22811ce
39 files changed
+231
-231
No files matched your search
+10
-10
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
MaxClaw Agent API Server
|
||||
Provides REST API for remote access to MaxClaw Agent
|
||||
LangCode Agent API Server
|
||||
Provides REST API for remote access to LangCode Agent
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
@@ -16,13 +16,13 @@ import uvicorn
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from config_manager import config_manager
|
||||
from main import create_maxclaw_agent
|
||||
from main import create_langcode_agent
|
||||
from langchain_core.messages import HumanMessage
|
||||
|
||||
# Initialize FastAPI app
|
||||
app = FastAPI(
|
||||
title="MaxClaw Agent API",
|
||||
description="REST API for MaxClaw Agent - configurable AI agent",
|
||||
title="LangCode Agent API",
|
||||
description="REST API for LangCode Agent - configurable AI agent",
|
||||
version="1.0.0"
|
||||
)
|
||||
|
||||
@@ -83,7 +83,7 @@ def get_agent():
|
||||
global agent
|
||||
if agent is None:
|
||||
try:
|
||||
agent = create_maxclaw_agent()
|
||||
agent = create_langcode_agent()
|
||||
except Exception as e:
|
||||
raise HTTPException(status_code=500, detail=f"Failed to create agent: {str(e)}")
|
||||
return agent
|
||||
@@ -94,8 +94,8 @@ async def startup_event():
|
||||
"""Initialize agent on startup"""
|
||||
global agent
|
||||
try:
|
||||
agent = create_maxclaw_agent()
|
||||
print("✅ MaxClaw Agent API server started")
|
||||
agent = create_langcode_agent()
|
||||
print("✅ LangCode Agent API server started")
|
||||
except Exception as e:
|
||||
print(f"❌ Failed to initialize agent: {e}")
|
||||
|
||||
@@ -108,7 +108,7 @@ async def root():
|
||||
return FileResponse(web_index)
|
||||
else:
|
||||
return {
|
||||
"message": "MaxClaw Agent API",
|
||||
"message": "LangCode Agent API",
|
||||
"version": "1.0.0",
|
||||
"endpoints": {
|
||||
"chat": "/chat",
|
||||
@@ -142,7 +142,7 @@ async def health_check():
|
||||
|
||||
@app.post("/chat", response_model=ChatResponse)
|
||||
async def chat(request: ChatRequest):
|
||||
"""Chat with MaxClaw Agent"""
|
||||
"""Chat with LangCode Agent"""
|
||||
try:
|
||||
agent_instance = get_agent()
|
||||
|
||||
|
||||
Reference in new issue
Block a user