Skip to content

Commit

Permalink
feat(chat): Added question sorting method
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Oct 2, 2023
1 parent 1ebd271 commit 6b5ce50
Show file tree
Hide file tree
Showing 8 changed files with 395 additions and 67 deletions.
18 changes: 18 additions & 0 deletions examples/question.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

const { questionQuery } = require('../lib/embeddings-query');
const util = require('util');

async function main() {
const question = 'Kui suur on mu eelmise kuu Amazoni arve?';

const info = await questionQuery(question, process.env.OPENAI_API_KEY, {
//gptModel: 'gpt-3.5-turbo',
//gptModel: 'gpt-4',
verbose: true
});

console.log(util.inspect(info, false, 22, true));
}

main();
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
const { generateSummary, DEFAULT_SYSTEM_PROMPT, DEFAULT_USER_PROMPT } = require('./lib/generate-summary');
const riskAnalysis = require('./lib/risk-analysis');
const { generateEmbeddings, getChunkEmbeddings } = require('./lib/generate-embeddings');
const { embeddingsQuery } = require('./lib/embeddings-query');
const { embeddingsQuery, questionQuery } = require('./lib/embeddings-query');

module.exports = {
generateSummary,
generateEmbeddings,
getChunkEmbeddings,
embeddingsQuery,
questionQuery,
riskAnalysis,
DEFAULT_SYSTEM_PROMPT,
DEFAULT_USER_PROMPT
Expand Down
Loading

0 comments on commit 6b5ce50

Please sign in to comment.