def create_function_result_part()

in aidial_adapter_vertexai/chat/gemini/conversation_factory.py [0:0]


    def create_function_result_part(self, name: str, args: str) -> GenAIPart:
        try:
            processed_args = json.loads(args)
        except Exception:
            processed_args = args

        if isinstance(processed_args, dict):
            return GenAIPart.from_function_response(name, processed_args)

        return GenAIPart.from_function_response(
            name, {"output": processed_args}
        )