Skip to content

Commit

Permalink
refactor: move and rename utils
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Sep 4, 2023
1 parent 2b0e4ca commit c0c2ba5
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/api/src/lib/approaches/ask-read-retrieve-read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { initializeAgentExecutorWithOptions } from 'langchain/agents';
import { CallbackManager, ConsoleCallbackHandler } from 'langchain/callbacks';
import { OpenAiService } from '../../plugins/openai.js';
import { LangchainService } from '../../plugins/langchain.js';
import { CsvLookupTool, HtmlCallbackHandler } from '../util/index.js';
import { CsvLookupTool, HtmlCallbackHandler } from '../langchain/index.js';
import { AskApproach } from './approach.js';
import { ApproachBase } from './approach-base.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/lib/approaches/chat-read-retrieve-read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ChatApproach, ApproachResponse } from './approach.js';
import { ApproachBase } from './approach-base.js';
import { HistoryMessage, Message, messagesToString } from '../message.js';
import { MessageBuilder } from '../message-builder.js';
import { getTokenLimit } from '../model-helpers.js';
import { getTokenLimit } from '../tokens.js';

const SYSTEM_MESSAGE_CHAT_CONVERSATION = `Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.
Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export * from './approaches/index.js';
export * from './util/index.js';
export * from './message-builder.js';
export * from './message.js';
export * from './model-helpers.js';
export * from './tokens.js';
2 changes: 2 additions & 0 deletions packages/api/src/lib/langchain/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './csv-lookup-tool.js';
export * from './html-callback-handler.js';
2 changes: 1 addition & 1 deletion packages/api/src/lib/message-builder.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTokenCountFromMessages } from './model-helpers.js';
import { getTokenCountFromMessages } from './tokens.js';
import { Message, MessageRole } from './message.js';

export class MessageBuilder {
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions packages/api/src/lib/util/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export * from './csv-lookup-tool.js';
export * from './html-callback-handler.js';
export * from './string.js';

0 comments on commit c0c2ba5

Please sign in to comment.