how can i pass on parameters through /v1/process #1254
-
where and how should i put parameters so they will be passed on to the langflow components in specified in my flow? try "parameters" & "artifacts" in data field, all failed... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
🤖 Hello @phoenix-lee-tpe! I'm Dosu, a friendly bot here to assist you with your questions, help squash bugs, and guide you through contributing to projects. While we wait for a human maintainer, I'll do my best to streamline the process for you. Let's dive right into it! To pass parameters to the langflow components in your flow through /v1/process, you can use the /**
* Sends data to the API for prediction.
*
* @param {sendAllProps} data - The data to be sent to the API.
* @returns {AxiosResponse<any>} The API response.
*/
export async function sendAll(data: sendAllProps) {
return await api.post(`${BASE_URL_API}predict`, data);
} You can pass the parameters as an object to the const data = {
// Fill this object with your parameters
param1: value1,
param2: value2,
// ...
};
sendAll(data)
.then(response => {
// Handle the response
})
.catch(error => {
// Handle the error
}); Please replace export type sendAllProps = {
nodes: Node[];
edges: Edge[];
name: string;
description: string;
viewport: Viewport;
inputs: { text?: string };
chatKey: string;
chatHistory: { message: string | object; isSend: boolean }[];
}; Here is a breakdown of its structure:
Unfortunately, I wasn't able to find any specific requirements or constraints for the parameters that can be passed to the langflow components through the /v1/process endpoint within the repository. If you could provide more details about the parameters you're trying to pass and the issues you're encountering, I might be able to provide a more specific solution. You can find more details about the SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
🤖
Hello @phoenix-lee-tpe! I'm Dosu, a friendly bot here to assist you with your questions, help squash bugs, and guide you through contributing to projects. While we wait for a human maintainer, I'll do my best to streamline the process for you. Let's dive right into it!
To pass parameters to the langflow components in your flow through /v1/process, you can use the
sendAll
function. This function sends data to the API for prediction. Here is the function definition: