-
Beta Was this translation helpful? Give feedback.
Answered by
gossese
Aug 28, 2024
Replies: 1 comment 3 replies
-
Hey @gossese! I'm here to help you with any bugs, questions, or contributions. I'm Dosu, a bot designed to assist you. To use the response body of the
Here is a code snippet demonstrating these steps: # Step 1: Make the API Request
api_request_component = APIRequestComponent()
api_request_component.urls = ["https://api.example.com/data"]
api_request_component.method = "GET"
responses = await api_request_component.make_requests()
# Step 2: Extract the Response Body
response_body = responses[0].data["result"]
# Step 3: Use the Response Body as Input for Split Text Component
split_text_component = SplitTextComponent()
split_text_component.data_inputs = [Data(text=response_body)]
split_text_result = split_text_component.split_text() In this example:
This approach ensures that the response body from the API request is correctly passed as input to the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That was it! I already created a custom component to wrap the response, but I used
data_input = Data(value=response_body)
The correct way is
data_input = Data(text=response_body)
That way, the Split Text component accepts the input and the chunks can be sent to the DB.