- Add /v1/chat/completions endpoint (POST) with streaming support - Add /v1/models endpoint (GET) listing available models - Add /v1/completions endpoint (POST) legacy compatibility - Add llm_api.py module with OpenAI API proxy via aiohttp - Add llm_service_url, llm_api_key, available_models to config model - Update harnessed_agent_config_view CRUD to protect API key field - Register new functions in init.py (harnessed_llm_chat_completions etc.) - Add .gitignore for pycache files Endpoints available under module path: POST /harnessed_agent/v1/chat/completions GET /harnessed_agent/v1/models POST /harnessed_agent/v1/completions
39 lines
1.3 KiB
JSON
39 lines
1.3 KiB
JSON
{
|
|
"tblname": "harnessed_agent_config",
|
|
"alias": "harnessed_agent_config_view",
|
|
"title": "Agent Configuration",
|
|
"params": {
|
|
"logined_userid": "user_id",
|
|
"confidential_fields": ["llm_api_key"],
|
|
"browserfields": {
|
|
"exclouded": ["llm_api_key", "available_models"],
|
|
"alters": {
|
|
"auto_cleanup_enabled": {
|
|
"uitype": "code",
|
|
"data": [
|
|
{"value": "1", "text": "Enabled"},
|
|
{"value": "0", "text": "Disabled"}
|
|
]
|
|
},
|
|
"enable_streaming": {
|
|
"uitype": "code",
|
|
"data": [
|
|
{"value": "1", "text": "Enabled"},
|
|
{"value": "0", "text": "Disabled"}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"editexclouded": [
|
|
"id",
|
|
"user_id",
|
|
"created_at",
|
|
"updated_at"
|
|
],
|
|
"editable": {
|
|
"new_data_url": "{{entire_url('../api/harnessed_agent_config_view_create.dspy')}}",
|
|
"update_data_url": "{{entire_url('../api/harnessed_agent_config_view_update.dspy')}}",
|
|
"delete_data_url": "{{entire_url('../api/harnessed_agent_config_view_delete.dspy')}}"
|
|
}
|
|
}
|
|
} |