Skip to content

Commit

Permalink
chore(deps): upgrade dependencies (#6)
Browse files Browse the repository at this point in the history
* chore(deps): upgrade dependencies

Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/WiseGPT/gpt-conversation-prompt/actions/runs/3916190321

------

*Automatically created by projen via the "upgrade-main" workflow*

Signed-off-by: github-actions <github-actions@github.com>

* chore: self mutation

Signed-off-by: github-actions <github-actions@github.com>

Signed-off-by: github-actions <github-actions@github.com>
Co-authored-by: github-actions <github-actions@github.com>
  • Loading branch information
Yengas and github-actions authored Jan 14, 2023
1 parent 798a2fc commit 210f419
Show file tree
Hide file tree
Showing 7 changed files with 240 additions and 199 deletions.
413 changes: 227 additions & 186 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json

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

4 changes: 2 additions & 2 deletions src/conversation-prompt/conversation-prompt.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import {
CreateCompletionResponseUsage,
OpenAIApi,
} from "openai";
import { ConversationPromptServiceError } from "../error";
import { APIResponseHeaders, APIUsageInfo } from "../types";
import {
ConversationCompleteInput,
ConversationCompleteOutput,
Expand All @@ -15,6 +13,8 @@ import {
import { createConversationCompletionPrompt } from "./prompts/create-conversation-completion-prompt";
import { createConversationSummaryPrompt } from "./prompts/create-conversation-summary-prompt";
import { STATEMENT_SEPARATOR_TOKEN } from "./prompts/prompts.constants";
import { ConversationPromptServiceError } from "../error";
import { APIResponseHeaders, APIUsageInfo } from "../types";

type APIResponseSuccess = { usage?: CreateCompletionResponseUsage };
type APIResponseError = { error: { message: string; type: string } };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { AIPersona, Conversation } from "../../types";
import { BOT_MENTION } from "../mention";
import { STATEMENT_SEPARATOR_TOKEN } from "./prompts.constants";
import { renderAIPersona } from "./render-ai-persona";
import { renderConversation } from "./render-conversation";
import { renderFormatAndExamples } from "./render-format-and-examples";
import { AIPersona, Conversation } from "../../types";
import { BOT_MENTION } from "../mention";

const CURRENT_CONVERSATION_PROMPT = `Continue the conversation, paying very close attention to things entities told you; such as their name, and personal details. Never say "${STATEMENT_SEPARATOR_TOKEN}". Current conversation:`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AIPersona, Conversation } from "../../types";
import { STATEMENT_SEPARATOR_TOKEN } from "./prompts.constants";
import { renderAIPersona } from "./render-ai-persona";
import { renderConversation } from "./render-conversation";
import { renderFormatAndExamples } from "./render-format-and-examples";
import { AIPersona, Conversation } from "../../types";

export type CreateConversationSummaryPromptInput = {
aiPersona: AIPersona;
Expand Down
2 changes: 1 addition & 1 deletion src/conversation-prompt/prompts/render-conversation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { STATEMENT_SEPARATOR_TOKEN } from "./prompts.constants";
import { Conversation } from "../../types";
import { buildMention } from "../mention";
import { STATEMENT_SEPARATOR_TOKEN } from "./prompts.constants";

export const renderConversation = ({ summary, messages }: Conversation) => {
const summaryText = summary
Expand Down
4 changes: 2 additions & 2 deletions src/conversation-prompt/prompts/render-format-and-examples.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Conversation } from "../../types";
import { BOT_MENTION, buildMention } from "../mention";
import { STATEMENT_SEPARATOR_TOKEN } from "./prompts.constants";
import { renderConversation } from "./render-conversation";
import { Conversation } from "../../types";
import { BOT_MENTION, buildMention } from "../mention";

const CONVERSATION_FORMAT = `The conversations are in this format, there can be an arbitrary amount of newlines between chat entries. "<@id>" format is used to reference entities in the conversation, where "id" is replaced with message author's unique id. The text "${STATEMENT_SEPARATOR_TOKEN}" is used to separate chat entries and make it easier for you to understand the context:`;
const CONVERSATION_FORMAT_WITH_EXAMPLE = `The conversations are in this format, there can be an arbitrary amount of newlines between chat entries. "<@id>" format is used to reference entities in the conversation, where "id" is replaced with message author's unique id. The text "${STATEMENT_SEPARATOR_TOKEN}" is used to separate chat entries and make it easier for you to understand the context. The conversations start with a "Summary:" which includes a detailed summary of messages in the same conversation. Summary ends with "${STATEMENT_SEPARATOR_TOKEN}":`;
Expand Down

0 comments on commit 210f419

Please sign in to comment.