diff --git a/.env.sample b/.env.sample index 035f9b30f..d1b51d667 100644 --- a/.env.sample +++ b/.env.sample @@ -5,7 +5,7 @@ # Use DEFAULT for the meta portal NUXT_PUBLIC_APP_API_ORG_CODE=CRI -# Custom favicon +# Custom favicon # (can be an absolute path, else will be relative to NUXT_PUBLIC_APP_PUBLIC_BINARIES_PREFIX) NUXT_PUBLIC_APP_FAVICON=favicon.ico # url prefix for a binary file storage (images...) @@ -77,7 +77,7 @@ PLAYWRIGHT_TEST_PASSWORD= ### examples suggestions separated by § character # NUXT_PUBLIC_APP_CHATBOT_EXEMPLES=Tell me about this platform§Find research projects on renewable energy§Find researchers and publication on climate change -# ==== OpenAI PRIVATE settings ==== +# ==== OpenAI PRIVATE settings ==== # OpenAI API Key for the chatbot # optional # NUXT_APP_OPENAI_API_KEY=sk-proj-XXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -96,4 +96,11 @@ PLAYWRIGHT_TEST_PASSWORD= # ==== GOTENBERG pdf (optional) Settings ==== # NUXT_APP_GOTENBERG_SERVER_URL=http://127.0.0.1:3333 -# NUXT_PUBLIC_APP_GOTENBERG_ENABLED='true' \ No newline at end of file +# NUXT_PUBLIC_APP_GOTENBERG_ENABLED='true' + +# ==== VECTOR DATABASE (optional) Settings ==== +# NUXT_APP_VECTOR_DB_URL=postgresql://myuser:mypassword@localhost:5432/mydb +# NUXT_APP_VECTOR_EMBEDDING_MODEL=text-embedding-3-small +# NUXT_APP_VECTOR_EMBEDDING_API_KEY=XXXXX +# NUXT_APP_VECTOR_EMBEDDING_DIMENSIONS=1536 +# NUXT_APP_VECTOR_TOOL_PROMPT="use this tool to answer about neuroscience project" diff --git a/k8s/projects-frontend/values.dev.yaml b/k8s/projects-frontend/values.dev.yaml index 62f6d3376..e95f00abf 100644 --- a/k8s/projects-frontend/values.dev.yaml +++ b/k8s/projects-frontend/values.dev.yaml @@ -1,11 +1,16 @@ config: nonSensitive: NUXT_PUBLIC_APP_KEYCLOAK_URL: https://keycloak.k8s.lp-i.dev - NUXT_PUBLIC_APP_VERSION: "{{ .Values.application.revision }}" + NUXT_PUBLIC_APP_VERSION: '{{ .Values.application.revision }}' NUXT_PUBLIC_APP_ENVIRONMENT: dev NUXT_APP_GOTENBERG_SERVER_URL: 'http://projects-gotenberg' NUXT_PUBLIC_APP_GOTENBERG_ENABLED: 'true' NUXT_APP_LANGCHAIN_PROMPT: '' + NUXT_APP_VECTOR_DB_URL: '' + NUXT_APP_VECTOR_EMBEDDING_API_KEY: '' + NUXT_APP_VECTOR_EMBEDDING_MODEL: '' + NUXT_APP_VECTOR_EMBEDDING_DIMENSIONS: '' + NUXT_APP_VECTOR_TOOL_PROMPT: '' domain: k8s.lp-i.dev diff --git a/k8s/projects-frontend/values.yaml b/k8s/projects-frontend/values.yaml index bc74cdd53..2e9da41c0 100644 --- a/k8s/projects-frontend/values.yaml +++ b/k8s/projects-frontend/values.yaml @@ -45,6 +45,11 @@ config: NUXT_APP_GOTENBERG_SERVER_URL: '' NUXT_PUBLIC_APP_GOTENBERG_ENABLED: '' NUXT_APP_LANGCHAIN_PROMPT: '' + NUXT_APP_VECTOR_DB_URL: '' + NUXT_APP_VECTOR_EMBEDDING_API_KEY: '' + NUXT_APP_VECTOR_EMBEDDING_MODEL: '' + NUXT_APP_VECTOR_EMBEDDING_DIMENSIONS: '' + NUXT_APP_VECTOR_TOOL_PROMPT: '' e2eEnv: nonSensitive: USER_ADMIN_EMAIL: testautomatatiquedministrateur1@outlook.fr diff --git a/nuxt.config.ts b/nuxt.config.ts index 41b1dfd68..9c904bb0a 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -131,7 +131,7 @@ export default defineNuxtConfig({ appGeocodingApiKey: '', appOpenaiApiKey: '', appOpenaiApiPromptId: '', - appOpenaiApiPromptVersion: '', + appOpeyanaiApiPromptVersion: '', appOpenaiApiVectorStoreId: '', appMcpServerUrl: '', appSorbobotApiToken: '', @@ -139,6 +139,11 @@ export default defineNuxtConfig({ appSorbobotApiTrace: 0, appGotenbergServerUrl: '', appLangchainPrompt: '', + appVectorDbUrl: '', + appVectorEmbeddingApiKey: '', + appVectorEmbeddingModel: '', + appVectorEmbeddingDimensions: '', + appVectorToolPrompt: '', public: { appVersion: '', appApiOrgCode: '', diff --git a/package.json b/package.json index 729f6e4dc..d904c37be 100644 --- a/package.json +++ b/package.json @@ -42,9 +42,11 @@ "@ckpack/vue-color": "^1.5.0", "@hocuspocus/provider": "^2.15.0", "@intlify/vue-i18n-loader": "^4.2.0", - "@langchain/core": "^1.1.17", + "@langchain/community": "^1.1.23", + "@langchain/core": "^1.1.32", "@langchain/langgraph": "^1.1.2", "@langchain/openai": "^1.2.3", + "@langchain/textsplitters": "^1.0.1", "@mdi/font": "^6", "@modelcontextprotocol/sdk": "^1.20.2", "@nuxt/test-utils": "^3.19.2", @@ -84,6 +86,7 @@ "deep-chat": "^2.3.0", "es-toolkit": "^1.40.0", "highlight.js": "^11", + "install": "^0.13.0", "langchain": "^1.2.14", "leaflet": "^1", "leaflet.markercluster": "^1.5.3", @@ -92,6 +95,8 @@ "nuxt": "^3.19.3", "nuxt-svgo": "4.2.6", "openai": "^5.23.0", + "pdf-parse": "^1", + "pg": "^8.20.0", "pinia": "^3.0.3", "prosemirror-markdown": "^1.13.1", "prosemirror-model": "^1.24.1", diff --git a/src/pages/DebugPage/Tabs/DebugOnboarding.vue b/src/pages/DebugPage/Tabs/DebugOnboarding.vue index 7f74349b9..76c7a2cc5 100644 --- a/src/pages/DebugPage/Tabs/DebugOnboarding.vue +++ b/src/pages/DebugPage/Tabs/DebugOnboarding.vue @@ -19,6 +19,22 @@ :disabled="!usersStore.userFromApi || resetingTerms" @click="resetTermsSigned" /> +