- {(agent.ragDataSources || []).map((source) => {
- const ds = dataSources.find((ds) => ds._id === source);
- return (
-
-
-
-
+
+ {(agent.ragDataSources || []).map((source) => {
+ const ds = dataSources.find((ds) => ds._id === source);
+ return (
+
+
+
+
+
+
+ {ds?.name || "Unknown"}
+
-
- {ds?.name || "Unknown"}
-
+
-
+
+ {agent.ragDataSources !== undefined && agent.ragDataSources.length > 0 && (
+ <>
+
+
+ {isAdvancedConfigOpen && (
+
+
+
handleUpdate({
...agent,
- ragDataSources: newSources
- });
- }}
- >
-
-
-
- );
- })}
+ ragReturnType: value as z.infer
['ragReturnType']
+ })}
+ classNames={{
+ label: "text-foreground dark:text-gray-300"
+ }}
+ >
+ Chunks
+ Content
+
+
+ handleUpdate({
+ ...agent,
+ ragK: parseInt(value)
+ })}
+ type="number"
+ />
+
+ )}
+ >
+ )}
+
- {agent.ragDataSources !== undefined && agent.ragDataSources.length > 0 && (
- <>
-
-
- {isAdvancedConfigOpen && (
-
-
- handleUpdate({
- ...agent,
- ragReturnType: value as z.infer['ragReturnType']
- })}
- classNames={{
- label: "text-foreground dark:text-gray-300"
- }}
- >
- Chunks
- Content
-
-
- handleUpdate({
- ...agent,
- ragK: parseInt(value)
- })}
- type="number"
- />
-
- )}
- >
- )}
-