Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rpidanny committed Jul 3, 2024
1 parent a5c866f commit ef42500
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const config: JestConfigWithTsJest = {
global: {
statements: 81,
branches: 90,
functions: 92,
functions: 90,
lines: 81,
},
},
Expand Down
2 changes: 0 additions & 2 deletions src/commands/chat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ export default class Chat extends BaseCommand<typeof Chat> {

initChatContainer(
{
headless: false,
concurrency,
summarize: false,
llmProvider,
skipCaptcha,
legacyProcessing,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/config/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class SetConfig extends Command {
const openai = await uiInput.promptOpenAIConfig(existingConfig?.openai)
const ollama = await uiInput.promptOllamaConfig(existingConfig?.ollama)

const config = {
const config: TConfig = {
openai,
ollama,
}
Expand Down
1 change: 1 addition & 0 deletions src/commands/download/papers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default class DownloadPapers extends BaseCommand<typeof DownloadPapers> {
const { headless } = this.flags

initDownloadContainer({ headless }, this.logger)

this.odysseus = Container.get(Odysseus)
await this.odysseus.init()

Expand Down
12 changes: 9 additions & 3 deletions src/containers/chat.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@ import { initSearchContainer } from './search.container.js'

export function initChatContainer(
opts: {
headless: boolean
concurrency: number
summarize: boolean
llmProvider: LLMProvider
skipCaptcha: boolean
legacyProcessing: boolean
},
config: TConfig,
logger: Quill,
) {
initSearchContainer(opts, config, logger)
initSearchContainer(
{
...opts,
headless: false,
summarize: false,
},
config,
logger,
)

Container.set(ChatOpenAI, Container.get(LLMFactory).getLLM(LLMProvider.OpenAI, config))
}

0 comments on commit ef42500

Please sign in to comment.