Skip to content

Commit

Permalink
stop_sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
scenaristeur committed Jun 17, 2024
1 parent 17e363b commit 2851f6a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import LangSelector from '@/components/LangSelector.vue';

<RouterView />
<HordeVue />
1.0.2 - engagement
1.0.3 - stop_sequence
<!-- <ContactView /> -->
</template>

Expand Down
24 changes: 14 additions & 10 deletions src/store/modules/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,29 @@
// 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,
system_prompt: null,
target: { sexe: null, type: null },
system_prompts: system_prompts,
uid: undefined,
response:null,
response: null,
server_url: 'http://localhost:3001'

// showMenu: false,
Expand All @@ -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
Expand Down Expand Up @@ -115,7 +119,7 @@ const actions = {
}

await axios
.post(context.state.server_url+"/embedAndSim", {
.post(context.state.server_url + '/embedAndSim', {
query
})
.then((response) => {
Expand Down

0 comments on commit 2851f6a

Please sign in to comment.