From 2851f6a859973b5580f42caaf340eb0d3650e939 Mon Sep 17 00:00:00 2001 From: scenaristeur Date: Mon, 17 Jun 2024 19:02:51 +0200 Subject: [PATCH] stop_sequence --- package-lock.json | 8 ++++---- package.json | 2 +- src/App.vue | 2 +- src/store/modules/core.js | 24 ++++++++++++++---------- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index a8d1f96..0e10e53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "equilibre", "version": "0.0.0", "dependencies": { - "@scenaristeur/horde-vue": "^1.0.1", + "@scenaristeur/horde-vue": "^1.0.2", "axios": "^1.6.2", "concurrently": "^8.2.2", "langchain": "^0.0.212", @@ -3271,9 +3271,9 @@ "dev": true }, "node_modules/@scenaristeur/horde-vue": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@scenaristeur/horde-vue/-/horde-vue-1.0.1.tgz", - "integrity": "sha512-kKeVnCW/nIe++Vlv2g3EqzHwJAHcH2eJuhq6+GygQX3Zile+m6sxYzjTt67hnbmqxa4Nxvq0As/stW2Hnsa6Kg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@scenaristeur/horde-vue/-/horde-vue-1.0.2.tgz", + "integrity": "sha512-3cpdpSFLD6ewZdm4ZUXE7XaRtnYzljA1uH5ND/7C7mPsLDfTCYVT7tk5eOF4hgMiMNy069AQyDPYdN6rhTVl2Q==", "dependencies": { "axios": "^1.6.5" } diff --git a/package.json b/package.json index 251ea6f..28f3c2b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "format": "prettier --write src/" }, "dependencies": { - "@scenaristeur/horde-vue": "^1.0.1", + "@scenaristeur/horde-vue": "^1.0.2", "axios": "^1.6.2", "concurrently": "^8.2.2", "langchain": "^0.0.212", diff --git a/src/App.vue b/src/App.vue index 0db52bd..924d218 100644 --- a/src/App.vue +++ b/src/App.vue @@ -29,7 +29,7 @@ import LangSelector from '@/components/LangSelector.vue'; - 1.0.2 - engagement + 1.0.3 - stop_sequence diff --git a/src/store/modules/core.js b/src/store/modules/core.js index 3516215..9966f9b 100644 --- a/src/store/modules/core.js +++ b/src/store/modules/core.js @@ -6,17 +6,21 @@ // import { HordeClient } from '@/api/horde_client.js' import axios from 'axios' import { v4 as uuidv4 } from 'uuid' -import {HordeClient} from '@scenaristeur/horde-vue' +import { HordeClient } from '@scenaristeur/horde-vue' import system_prompts from '@/prompts/system_prompts' -console.log("system_prompts", system_prompts) +console.log('system_prompts', system_prompts) const state = () => ({ - HordeClient: new HordeClient( - {api_key: localStorage.getItem('hordeApi') || '0000000000', + HordeClient: new HordeClient({ + api_key: localStorage.getItem('hordeApi') || '0000000000', temperature: 0.1, - max_length:100, - max_context_length :1024 }), + max_length: 100, + max_context_length: 1024, + "stop_sequence": [ + "string" + ], + }), lang: null, sexe: null, type: null, @@ -24,7 +28,7 @@ const state = () => ({ target: { sexe: null, type: null }, system_prompts: system_prompts, uid: undefined, - response:null, + response: null, server_url: 'http://localhost:3001' // showMenu: false, @@ -41,8 +45,8 @@ const mutations = { initChat(state, options) { state.target = options let system_prompt = - state.system_prompts[state.target.sexe][state.target.type][state.lang] - + state.system_prompts['engagement'][state.lang] + state.system_prompts[state.target.sexe][state.target.type][state.lang] + + state.system_prompts['engagement'][state.lang] console.log(state.target) state.sexe = options.sexe state.type = options.type @@ -115,7 +119,7 @@ const actions = { } await axios - .post(context.state.server_url+"/embedAndSim", { + .post(context.state.server_url + '/embedAndSim', { query }) .then((response) => {