New RunLLM response generated: >>>*# Question* he...
# runllm-flyte-trial
a
New RunLLM response generated: >>>*# Question* hey guys, I have a question - I would like to call an external service that is running from a sensor agent, in Flyte, what is the way to establish connection to an external service? for example, what I’m looking for is the equivalent of this in Airflow get_connection (source code here), in Airflow, I would implement a Hook/Client that I want and extend this baseHook class to establish connection, is there a way to do it in Flyte? # Answer Flyte does not have a direct equivalent to Airflow's
BaseHook.get_connection
. However, you can achieve similar functionality using Flyte agents. Flyte agents are long-running, stateless services that can interact with external services via gRPC. They are designed to handle tasks asynchronously and can be implemented in Python, making them flexible and easy to use. To establish a connection to an external service using a Flyte agent, you would typically: 1. Create an Agent: Implement an agent service that handles the connection and communication with the external service. 2. Register the Agent: Use Flyte's Python SDK to register the agent and define the tasks it will handle. 3. Deploy the Agent: Deploy the agent as a Kubernetes service, which will receive execution requests from FlytePropeller. For more details, you can refer to the Flyte agents documentation and the example of writing agents in Python. Would you like more detailed steps or a code example? Sources: - Flyte agents documentation - Example of writing agents in Python Slack Link https://flyte-org.slack.com/archives/CP2HDHKE1/p1718385111.079129 šŸ‘ 0 button šŸ‘Ž 0 button šŸ’” Hint: Mention @runllm in the thread for followups.