Skip to content

Instantly share code, notes, and snippets.

View flexchar's full-sized avatar

Lukas Vanagas flexchar

View GitHub Profile
@flexchar
flexchar / getOpenAiConfig.ts
Created June 26, 2024 14:34
easy way to use variety of (providers) models with open ai client // typescrit
export type Provider =
| 'anyscale'
| 'deepinfra'
| 'deepinfra-helicone'
| 'mistral'
| 'openai-helicone'
| 'openai'
| 'anthropic'
| 'groq'
| 'google-ai-studio'
@flexchar
flexchar / LoopsService.php
Last active November 28, 2024 15:55
Minimal class for creating and deleting contacts from Laravel users in Loops.so (email service)
<?php
namespace App\Services;
use App\Models\User;
use Illuminate\Http\Client\Response;
use Illuminate\Support\Facades\Http;
class LoopsService
{
@flexchar
flexchar / initializeAiClientFromModelName.ts
Created March 26, 2025 20:45
good old days abstracting providers
import { mistral } from '@/functions/ai/providers/mistral';
import {
ClaudeModels,
DeepInfraModels,
VertexModels,
OpenAiModels,
GoogleStudioModels,
FireworksModel,
MistralModels,
} from '@/static/models';