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

feat(Dynamic Models): Added Together AI Dynamic Models #513

Merged

Conversation

thecodacus
Copy link
Collaborator

@thecodacus thecodacus commented Dec 2, 2024

Add Support for Together AI Models & Dynamic Models List

Overview

This PR enhances our LLM integration by adding support for Together AI models and implementing improved API key management across different providers. The changes include dynamic model loading based on API keys and TypeScript improvements for better type safety.

Key Changes

1. Together AI Integration

  • Implemented dynamic model fetching from Together AI API
  • Added support for Together model pricing and context window information

2. API Key Management

  • Improved API key handling across client and server

3. Type Safety Improvements

  • Removed @ts-nocheck comments and implemented proper TypeScript types
  • Added type definitions for API responses and configurations
  • Improved type safety in model management functions
  • Added TypeScript interfaces for provider configurations

4. Model List Management

  • Refactored model list initialization to support dynamic updates
  • Added support for provider-specific model fetching

Technical Details

Dynamic Model Loading

  • Implemented getModelList function to fetch models from all providers (can be used in server side)
  • Added provider-specific model fetching logic

API Key Integration

  • Created unified API key management system (fetch apikeys from cookies in both client and server-side )
  • Improved error handling for missing API keys

Testing

  • Tested model fetching with valid API keys
  • Verified error handling with invalid API keys
  • Tested cookie management
  • Verified type safety improvements
  • Tested environment variable integration

Migration Notes

  • No breaking changes for existing functionality

@thecodacus thecodacus merged commit 2e49905 into stackblitz-labs:main Dec 6, 2024
1 check passed
JJ-Dynamite pushed a commit to val-x/valenClient that referenced this pull request Jan 29, 2025
…namic-model-list

feat(Dynamic Models): Added Together AI Dynamic Models
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