Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to Specify OIDs or Groups During Document Upload? #2074

Open
jeannot-prvlimburg opened this issue Oct 23, 2024 · 3 comments
Open

Comments

@jeannot-prvlimburg
Copy link

I'm currently exploring the data ingestion process of this repository and need some assistance. Specifically, I'm trying to figure out how to specify OIDs or groups when uploading documents, for example, through the following command:

./.venv/bin/python ./app/backend/prepdocs.py './data/*' --verbose $additionalArgs

Thanks in advance for your help!

@jeannot-prvlimburg jeannot-prvlimburg changed the title How to Specify OIDs or Groups During Document Upload? Question: How to Specify OIDs or Groups During Document Upload? Oct 23, 2024
@mattgotteiner
Copy link
Collaborator

Hi @jeannot-prvlimburg,

We don't support this today - this is a feature we can add though. How are your OIDs / groups stored?

@cforce
Copy link
Contributor

cforce commented Oct 25, 2024

Shouldn't the adslgen2.py already upload files to directories with certain groups (oids) ?
See also #2065

@cforce
Copy link
Contributor

cforce commented Oct 26, 2024

Jus an idea i experiment with is to use docs_acls.json as source for includes/excludes and map
directory 1:1 category
directory 1:1 acl group

app.py

@bp.route("/acl")
async def get_acl_data():
    file_path = os.path.join(bp.static_folder, "aclData.json")
    async with bp.open_resource(file_path) as f:
        data = json.load(f)
    return jsonify(data)

chat.tsx

const [aclData, setAclData] = useState<any>(null);
useEffect(() => {
     const fetchAclData = async () => {
         const response = await fetch("/acl");
         const data = await response.json();
         setAclData(data);
     };

     fetchAclData();
 }, []);
 
 -------
 
 <Dropdown
                     id={includeCategoryFieldId}
                     className={styles.chatSettingsSeparator}
                     label={t("labels.includeCategory")}
                     selectedKey={includeCategory}
                     onChange={onIncludeCategoryChanged}
                     aria-labelledby={includeCategoryId}
                     options={[
                         { key: "", text: t("labels.includeCategoryOptions.all") },
                         ...Object.keys(aclData?.directories || {}).map(dir => ({ key: dir, text: dir }))
                     ]}
                     onRenderLabel={(props: IDropdownProps | undefined) => (
                         <HelpCallout
                             labelId={includeCategoryId}
                             fieldId={includeCategoryFieldId}
                             helpText={t("helpTexts.includeCategory")}
                             label={props?.label}
                         />
                     )}
                 />
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants