Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create LLM Abstractions for OpenAI, Claude Opus and Google Gemini with a common base class #15

Closed
rbjarnason opened this issue May 2, 2024 · 1 comment

Comments

@rbjarnason
Copy link
Contributor

rbjarnason commented May 2, 2024

Task Description
Create LLM classes for OpenAI, Claude Opus and Google Gemini, with a design that allows easy addition of other models in the future. This is a typescript based es module NodeJS modern server application.

Task Instructions
1. Create a new base chat class src/models/baseChatModel.ts in a new file.
2. Then create src/models/openAiChat.ts, src/models/claudeOpusChat.ts and src/models/googleGeminiChat.ts for chat only
3. For the cloudeOpus use the @anthropic-ai/sdk npm
4. For the googleGemini use the @google/generative-ai npm
5. For the openAi use the openai npm
6. The baseChatModel and the child classes should only implement those two methods:
generate([{role:string,message:string}], streaming: boolean | undefined, streamingCallback: Function | undefined)
getNumTokensFromMessages([{role:string,message:string}])

@rbjarnason rbjarnason assigned rbjarnason and unassigned rbjarnason May 2, 2024
@rbjarnason
Copy link
Contributor Author

Has been completed by Engineer. Fully automatically programmed: 83d7826

@rbjarnason rbjarnason changed the title Add LLM abstractions from LangChain TS for Claude Opus and Google Gemini Create LLM Abstractions for OpenAI, Claude Opus and Google Gemini with a common base class May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant