Skip to content

Commit

Permalink
Using easy QA prompt by default
Browse files Browse the repository at this point in the history
  • Loading branch information
gsproston-scottlogic committed Aug 22, 2023
1 parent e1b1e1b commit 50837bf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
3 changes: 2 additions & 1 deletion backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ChatCompletionRequestMessage } from "openai";
import { EmailInfo } from "./models/email";
import { DefenceInfo } from "./models/defence";
import { CHAT_MODELS } from "./models/chat";
import { retrievalQAPrePrompt } from "./promptTemplates";

dotenv.config();

Expand Down Expand Up @@ -91,7 +92,7 @@ app.listen(port, () => {

// for dev purposes only - set the API key from the environment variable
const envOpenAiKey = process.env.OPENAI_API_KEY;
const prePrompt = getQALLMprePrompt(getInitialDefences());
const prePrompt = retrievalQAPrePrompt;
if (envOpenAiKey && prePrompt) {
console.debug("Initializing models with API key from environment variable");
setOpenAiApiKey(envOpenAiKey, defaultModel, prePrompt);
Expand Down
37 changes: 20 additions & 17 deletions prompt-injection.code-workspace
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
{
"folders": [
{
"path": "."
},
{
"name": "frontend",
"path": "frontend"
},
{
"name": "backend",
"path": "backend"
}
],
"settings": {
"jest.disabledWorkspaceFolders": ["prompt-injection"]
}
}
"folders": [
{
"path": "."
},
{
"name": "backend",
"path": "backend"
},
{
"name": "frontend",
"path": "frontend"
}
],
"settings": {
"jest.disabledWorkspaceFolders": [
"prompt-injection",
"frontend"
]
}
}

0 comments on commit 50837bf

Please sign in to comment.