()
| 9 | |
| 10 | |
| 11 | def init_settings(): |
| 12 | model_provider = os.getenv("MODEL_PROVIDER") |
| 13 | match model_provider: |
| 14 | case "openai": |
| 15 | init_openai() |
| 16 | case "ollama": |
| 17 | init_ollama() |
| 18 | case "anthropic": |
| 19 | init_anthropic() |
| 20 | case "gemini": |
| 21 | init_gemini() |
| 22 | case "azure-openai": |
| 23 | init_azure_openai() |
| 24 | case _: |
| 25 | raise ValueError(f"Invalid model provider: {model_provider}") |
| 26 | Settings.chunk_size = int(os.getenv("CHUNK_SIZE", "1024")) |
| 27 | Settings.chunk_overlap = int(os.getenv("CHUNK_OVERLAP", "20")) |
| 28 | |
| 29 | |
| 30 | def init_ollama(): |
no test coverage detected