- Add data_filter with 4 searchable fields (name LIKE, model LIKE, providerid, upappid) - Add filter_labels for search form display - Create llm_list.dspy with DBFilter support and LIKE wildcard handling - Create llm_create.dspy, llm_update.dspy, llm_delete.dspy - Create get_organizations.dspy and get_upapps.dspy for dropdown options - Add browserfields alters for providerid and upappid dropdowns - Add editable URLs for DataViewer CRUD operations
22 lines
601 B
Python
22 lines
601 B
Python
#!/usr/bin/env python3
|
|
import json
|
|
from appPublic.uniqueID import getID
|
|
|
|
result = {'success': False, 'message': ''}
|
|
|
|
try:
|
|
dbname = get_module_dbname('llmage')
|
|
async with DBPools().sqlorContext(dbname) as sor:
|
|
data = params_kw.copy()
|
|
data.pop('page', None)
|
|
data.pop('rows', None)
|
|
data.pop('data_filter', None)
|
|
data['id'] = getID()
|
|
await sor.C('llm', data)
|
|
result['success'] = True
|
|
result['message'] = '创建成功'
|
|
except Exception as e:
|
|
result['message'] = str(e)
|
|
|
|
return json.dumps(result, ensure_ascii=False, default=str)
|