mirror of
https://github.com/StanGirard/quivr.git
synced 2025-01-03 08:45:26 +03:00
Add support for submodules and fix file path in
.gitignore
This commit is contained in:
parent
80e2c08d14
commit
cad840203f
2
.github/workflows/vercel.yml
vendored
2
.github/workflows/vercel.yml
vendored
@ -14,6 +14,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'true'
|
||||
- name: Install Vercel CLI
|
||||
run: npm install --global vercel@latest
|
||||
- name: Pull Vercel Environment Information
|
||||
|
@ -11,6 +11,7 @@ import {
|
||||
|
||||
import {
|
||||
CreateBrainInput,
|
||||
ListFilesProps,
|
||||
SubscriptionUpdatableProperties,
|
||||
UpdateBrainInput,
|
||||
} from "./types";
|
||||
@ -144,8 +145,8 @@ export const getDocsFromQuestion = async (
|
||||
brainId: string,
|
||||
question: string,
|
||||
axiosInstance: AxiosInstance
|
||||
): Promise<string[]> => {
|
||||
return (await axiosInstance.post<Record<"docs",string[]>>(`/brains/${brainId}/documents`, {
|
||||
): Promise<ListFilesProps["files"]> => {
|
||||
return (await axiosInstance.post<Record<"docs",ListFilesProps["files"]>>(`/brains/${brainId}/documents`, {
|
||||
question,
|
||||
})).data.docs;
|
||||
}
|
||||
|
@ -23,6 +23,17 @@ export type SubscriptionUpdatableProperties = {
|
||||
role: BrainRoleType | null;
|
||||
};
|
||||
|
||||
export type ListFilesProps = {
|
||||
files: {
|
||||
file_name: string;
|
||||
file_sha1: string;
|
||||
file_size: number;
|
||||
file_url: string;
|
||||
file_id: string;
|
||||
file_similarity: number;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type ApiBrainDefinitionSecret = {
|
||||
name: string;
|
||||
type: ApiBrainDefinitionSchemaPropertyType;
|
||||
|
Loading…
Reference in New Issue
Block a user