I'm using my own api For example I have this: `c...
# general-english
w
I'm using my own api For example I have this:
Copy code
class SearchKnowledgeBaseToolApi(APIView):
    def post(self, request, public_id):
        """
        Search Knowledge Base API
        """
        
        function_call_id = request.data['message']['toolCalls'][0]['id']
        function_call_search_term = request.data['message']['toolCalls'][0]['function']['arguments']['search_term']
        print(function_call_id)
        print(function_call_search_term)
        function_call_response = 'Example response text'

        return Response({
            'role': 'tool',
            'content': function_call_response,
            'tool_call_id': function_call_id,
        })
I return the response as OpenAI expects a response message, but my assistant doesn't seem to get the answer fed properly
5 Views