Following the emergence of Internet of Things (IoT) and edge computing technologies and the development of distributed applications with strict Quality of Service (QoS) requirements, a transition is underway from centralized computing models to distributed computing continuum systems. The latter provide abstractions of the available resources, while they lead to the development of orchestration mechanisms with increased distributed intelligence and autonomy characteristics. These characteristics make the computing continuum suitable for managing serverless computing applications, considering their loose coupling with the resources and the need for reactiveness and efficiency to serve dynamic workloads in the edge and cloud part of the infrastructure. This paper presents an intent-based approach for the orchestration of a function chain over an edge and cloud infrastructure. We propose a Reinforcement Learning (RL) based autoscaling method that incorporates a reward function that aims to provide optimal utilization of resources and timely autoscaling of the functions, taking advantage of methods for workload prediction. Based on a high-level intent, the proposed optimization problem dictates the scheduling of the functions, minimizing the communication overhead and transformation cost while also considering the energy efficiency of the infrastructure. The proposed solution is evaluated with other state-of-the-art techniques for autoscaling and scheduling of serverless functions in a small edge infrastructure. Our solution provides 1.52% QoS violations with a slight increase in the deployed resources, while also significantly reducing the total cost and power consumption for the deployment of the function chain.