Skip to content

Conversation

yikuochan
Copy link

Summary

• Migrated from Anthropic Claude API to company's RDSec internal LLM endpoint
• Added OpenAI-compatible client implementation with function calling support
• Maintained backward compatibility with Anthropic API as fallback option
• Updated configuration to prioritize company LLM while preserving legacy support

Key Changes

New OpenAIGenerator class - Handles company LLM API with OpenAI-compatible interface
Enhanced configuration - Added RDSEC_API_ENDPOINT and RDSEC_API_KEY environment variables
Intelligent fallback system - Automatically uses Anthropic API if company credentials unavailable
Dependencies updated - Added openai and tiktoken packages for company LLM integration
Tool compatibility - Converted Anthropic tool format to OpenAI functions format

Test Plan

  • Verify RAG system starts with company LLM credentials
  • Test search functionality and response generation
  • Confirm fallback to Anthropic API when company credentials missing
  • Validate tool/function calling works with both providers
  • Check conversation history persistence across providers

🤖 Generated with Claude Code

- Add OpenAIGenerator class with function calling support for company LLM
- Update configuration to prioritize RDSec API with Anthropic fallback
- Add OpenAI and tiktoken dependencies for company LLM integration
- Maintain backward compatibility with existing Anthropic integration
- Update environment configuration and startup messages
- Verified working integration with search tools and course data

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant