MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / post

Method post

apps/chat/views/chat.py:165–176  ·  view source on GitHub ↗
(self, request: Request, chat_id: str)

Source from the content-addressed store, hash-verified

163 tags=[_('Chat')] # type: ignore
164 )
165 def post(self, request: Request, chat_id: str):
166 ip_address = _get_ip_address(request)
167 return ChatSerializers(data={'chat_id': chat_id,
168 'chat_user_id': request.auth.chat_user_id,
169 'chat_user_type': request.auth.chat_user_type,
170 'application_id': request.auth.application_id,
171 'debug': False,
172 'ip_address': ip_address,
173 'source': {
174 'type': ChatSourceChoices.API_CALL.value if request.auth.chat_user_type == ChatUserType.APPLICATION_API_KEY.value else ChatSourceChoices.ONLINE.value}
175 }
176 ).chat(request.data)
177
178
179class OpenView(APIView):

Callers

nothing calls this directly

Calls 3

_get_ip_addressFunction · 0.90
ChatSerializersClass · 0.90
chatMethod · 0.45

Tested by

no test coverage detected