Skip to content

[Good First Issue] Add OpenAI GPT adapter for multi-provider support #4

@pixelstrade-dev

Description

@pixelstrade-dev

Description

Currently CAIMS only supports Anthropic Claude as LLM provider. We need to add an OpenAI GPT adapter to enable multi-provider support.

What to do

  1. Create a new file apps/web/lib/adapters/openai.ts following the pattern in apps/web/lib/adapters/anthropic.ts
    1. Implement the same chat() interface returning { content, inputTokens, outputTokens }
    1. Use the openai npm package
    1. Add OPENAI_API_KEY to .env.example
    1. Add a provider selection mechanism in the chat route

Skills needed

  • TypeScript
    • Basic understanding of LLM APIs

References

Metadata

Metadata

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions