Skip to content

Commit

Permalink
Move LLM providers into src/providers.
Browse files Browse the repository at this point in the history
Part of #5.
  • Loading branch information
jkomoros committed Jan 9, 2024
1 parent e98d7c6 commit feeef88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import {
computePromptAnthropic,
computePromptStreamAnthropic,
computeTokenCountAnthropic
} from './anthropic.js';
} from './providers/anthropic.js';

import {
computePromptOpenAI,
computePromptStreamOpenAI,
computeTokenCountOpenAI
} from './openai.js';
} from './providers/openai.js';

import {
TypedObject
Expand Down
4 changes: 2 additions & 2 deletions src/anthropic.ts → src/providers/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import {
CompletionInfo,
Prompt,
PromptOptions
} from './types.js';
} from '../types.js';

import {
textForPrompt
} from './llm.js';
} from '../llm.js';

export const computePromptStreamAnthropic = async (modelName : string, apiKey : string, prompt : Prompt, modelInfo : CompletionInfo, _opts : PromptOptions) => {
const anthropic = new Anthropic({apiKey});
Expand Down
4 changes: 2 additions & 2 deletions src/openai.ts → src/providers/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
CompletionInfo,
Prompt,
PromptOptions
} from './types.js';
} from '../types.js';

import {
textForPrompt
} from './llm.js';
} from '../llm.js';

import {
ChatCompletionContentPart
Expand Down

0 comments on commit feeef88

Please sign in to comment.