UPDATE
This commit is contained in:
+2
-2
@@ -132,7 +132,7 @@ class ChatView(APIView):
|
||||
],
|
||||
)
|
||||
def post(self, request: Request):
|
||||
from farm_data.services import get_farm_details
|
||||
from farm_data.services import build_ai_farm_snapshot
|
||||
from .config import load_rag_config
|
||||
|
||||
data = request.data if request.method == "POST" else request.query_params
|
||||
@@ -178,7 +178,7 @@ class ChatView(APIView):
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
)
|
||||
cfg = load_rag_config()
|
||||
farm_details = get_farm_details(farm_uuid)
|
||||
farm_details = build_ai_farm_snapshot(farm_uuid)
|
||||
if farm_details is None:
|
||||
return Response(
|
||||
{"code": 404, "msg": "farm پیدا نشد."},
|
||||
|
||||
Reference in New Issue
Block a user