Usage guidance for code component #8879
Unanswered
nikghost17
asked this question in
Q&A
Replies: 1 comment 6 replies
-
|
@nikghost17 Sorry for the bad experience. Here is the doc: https://ragflow.io/docs/dev/code_component |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Guys can you tell me how to use the code component while creating a agent ?
this is the flow I want to achieve
after the generation of chunks I want to pass only unique chunks to my llm
but everytime I try to use code it says
AttributeError("'IterationParam' object has no attribute 'output'")
or
AttributeError("'ConcentratorParam' object has no attribute 'output'")
could you pls help I am so stuck
-->> more context
so basically I am creating a chatbot for finantial document
as you can see I am performing different steps so that retrieval will be spot on
Ideal behaviour -->>>
from retrieval_1 (from loop) and retrieval_0 (after the keywords) I am getting some chunks of data (piece of data from the pdfs) for a specific user query (user asked question)
that chunks I want to pass to my llm (named 'Relevance-Score-Calculator' (the 'Relevance-Sco...'), llm is open-AI gpt 4o) for some operation
problem in this -->>>
when I pass these chunks there are a few duplicates
which if I pass to llm it exceeds the limit of my llm
use of code component -->>>
I am trying to use code component to basically trim down the duplicate chunks
so that I can pass only unique chunks to the llm further
problem faced -->>>
I put input variable as loop (name of the iteration component)
i) Does this error mean that the iteration object doesnt provide any output ?
ii) If that is the case how can I pass those chunks stored in my 'Loop' to the code ?
iii) If IterationParam does provide any output what form is it ? (array ? , json ? , string ?)
iv) What type of output does the retrival component provides ?
Loop component INPUT->

Loop component OUTPUT->

**Suggestion -->> **
Detailed behaviour of all components should be neetly listed in the DOCUMENT
Beta Was this translation helpful? Give feedback.
All reactions