repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | import { OpenAIEmbedder } from "../embeddings/openai"; |
| #2 | import { OllamaEmbedder } from "../embeddings/ollama"; |
| #3 | import { OpenAILLM } from "../llms/openai"; |
| #4 | import { OpenAIStructuredLLM } from "../llms/openai_structured"; |
| #5 | import { AnthropicLLM } from "../llms/anthropic"; |
| #6 | import { GroqLLM } from "../llms/groq"; |
| #7 | import { MistralLLM } from "../llms/mistral"; |
| #8 | import { MemoryVectorStore } from "../vector_stores/memory"; |
| #9 | import { |
| #10 | EmbeddingConfig, |
| #11 | HistoryStoreConfig, |
| #12 | LLMConfig, |
| #13 | VectorStoreConfig, |
| #14 | } from "../types"; |
| #15 | import { Embedder } from "../embeddings/base"; |
| #16 | import { LLM } from "../llms/base"; |
| #17 | import { VectorStore } from "../vector_stores/base"; |
| #18 | import { Qdrant } from "../vector_stores/qdrant"; |
| #19 | import { VectorizeDB } from "../vector_stores/vectorize"; |
| #20 | import { RedisDB } from "../vector_stores/redis"; |
| #21 | import { OllamaLLM } from "../llms/ollama"; |
| #22 | import { SupabaseDB } from "../vector_stores/supabase"; |
| #23 | import { SQLiteManager } from "../storage/SQLiteManager"; |
| #24 | import { MemoryHistoryManager } from "../storage/MemoryHistoryManager"; |
| #25 | import { SupabaseHistoryManager } from "../storage/SupabaseHistoryManager"; |
| #26 | import { HistoryManager } from "../storage/base"; |
| #27 | import { GoogleEmbedder } from "../embeddings/google"; |
| #28 | import { GoogleLLM } from "../llms/google"; |
| #29 | import { AzureOpenAILLM } from "../llms/azure"; |
| #30 | import { AzureOpenAIEmbedder } from "../embeddings/azure"; |
| #31 | import { LangchainLLM } from "../llms/langchain"; |
| #32 | import { LangchainEmbedder } from "../embeddings/langchain"; |
| #33 | import { LangchainVectorStore } from "../vector_stores/langchain"; |
| #34 | import { AzureAISearch } from "../vector_stores/azure_ai_search"; |
| #35 | |
| #36 | export class EmbedderFactory { |
| #37 | static create(provider: string, config: EmbeddingConfig): Embedder { |
| #38 | switch (provider.toLowerCase()) { |
| #39 | case "openai": |
| #40 | return new OpenAIEmbedder(config); |
| #41 | case "ollama": |
| #42 | return new OllamaEmbedder(config); |
| #43 | case "google": |
| #44 | case "gemini": |
| #45 | return new GoogleEmbedder(config); |
| #46 | case "azure_openai": |
| #47 | return new AzureOpenAIEmbedder(config); |
| #48 | case "langchain": |
| #49 | return new LangchainEmbedder(config); |
| #50 | default: |
| #51 | throw new Error(`Unsupported embedder provider: ${provider}`); |
| #52 | } |
| #53 | } |
| #54 | } |
| #55 | |
| #56 | export class LLMFactory { |
| #57 | static create(provider: string, config: LLMConfig): LLM { |
| #58 | switch (provider.toLowerCase()) { |
| #59 | case "openai": |
| #60 | return new OpenAILLM(config); |
| #61 | case "openai_structured": |
| #62 | return new OpenAIStructuredLLM(config); |
| #63 | case "anthropic": |
| #64 | return new AnthropicLLM(config); |
| #65 | case "groq": |
| #66 | return new GroqLLM(config); |
| #67 | case "ollama": |
| #68 | return new OllamaLLM(config); |
| #69 | case "google": |
| #70 | case "gemini": |
| #71 | return new GoogleLLM(config); |
| #72 | case "azure_openai": |
| #73 | return new AzureOpenAILLM(config); |
| #74 | case "mistral": |
| #75 | return new MistralLLM(config); |
| #76 | case "langchain": |
| #77 | return new LangchainLLM(config); |
| #78 | default: |
| #79 | throw new Error(`Unsupported LLM provider: ${provider}`); |
| #80 | } |
| #81 | } |
| #82 | } |
| #83 | |
| #84 | export class VectorStoreFactory { |
| #85 | static create(provider: string, config: VectorStoreConfig): VectorStore { |
| #86 | switch (provider.toLowerCase()) { |
| #87 | case "memory": |
| #88 | return new MemoryVectorStore(config); |
| #89 | case "qdrant": |
| #90 | return new Qdrant(config as any); |
| #91 | case "redis": |
| #92 | return new RedisDB(config as any); |
| #93 | case "supabase": |
| #94 | return new SupabaseDB(config as any); |
| #95 | case "langchain": |
| #96 | return new LangchainVectorStore(config as any); |
| #97 | case "vectorize": |
| #98 | return new VectorizeDB(config as any); |
| #99 | case "azure-ai-search": |
| #100 | return new AzureAISearch(config as any); |
| #101 | default: |
| #102 | throw new Error(`Unsupported vector store provider: ${provider}`); |
| #103 | } |
| #104 | } |
| #105 | } |
| #106 | |
| #107 | export class HistoryManagerFactory { |
| #108 | static create(provider: string, config: HistoryStoreConfig): HistoryManager { |
| #109 | switch (provider.toLowerCase()) { |
| #110 | case "sqlite": |
| #111 | return new SQLiteManager(config.config.historyDbPath || ":memory:"); |
| #112 | case "supabase": |
| #113 | return new SupabaseHistoryManager({ |
| #114 | supabaseUrl: config.config.supabaseUrl || "", |
| #115 | supabaseKey: config.config.supabaseKey || "", |
| #116 | tableName: config.config.tableName || "memory_history", |
| #117 | }); |
| #118 | case "memory": |
| #119 | return new MemoryHistoryManager(); |
| #120 | default: |
| #121 | throw new Error(`Unsupported history store provider: ${provider}`); |
| #122 | } |
| #123 | } |
| #124 | } |
| #125 |