update default config.json setup and example-config.json

This commit is contained in:
LeonOstrez
2024-07-25 14:33:09 +02:00
parent 6933eb92fd
commit f1dbd3481b
3 changed files with 19 additions and 2 deletions

View File

@@ -306,7 +306,12 @@ class Config(_StrictModel):
Pythagora Core configuration
"""
llm: dict[LLMProvider, ProviderConfig] = Field(default={LLMProvider.OPENAI: ProviderConfig()})
llm: dict[LLMProvider, ProviderConfig] = Field(
default={
LLMProvider.OPENAI: ProviderConfig(),
LLMProvider.ANTHROPIC: ProviderConfig(),
}
)
agent: dict[str, AgentLLMConfig] = Field(
default={
DEFAULT_AGENT_NAME: AgentLLMConfig(),

View File

@@ -23,7 +23,7 @@ class AnthropicClient(BaseLLMClient):
def _init_client(self):
self.client = AsyncAnthropic(
api_key=self.config.api_key,
# base_url=self.config.base_url,
base_url=self.config.base_url,
timeout=Timeout(
max(self.config.connect_timeout, self.config.read_timeout),
connect=self.config.connect_timeout,

View File

@@ -10,6 +10,13 @@
"connect_timeout": 60.0,
"read_timeout": 10.0
},
// Example config for Anthropic (see https://docs.anthropic.com/docs/api-reference)
"anthropic": {
"base_url": "https://api.anthropic.com",
"api_key": "your-api-key",
"connect_timeout": 60.0,
"read_timeout": 10.0
},
// Example config for Azure OpenAI (see https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions)
"azure": {
"base_url": "https://your-resource-name.openai.azure.com/",
@@ -40,6 +47,11 @@
"provider": "openai",
"model": "gpt-3.5-turbo",
"temperature": 0.0
},
"BugHunter.check_logs": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20240620",
"temperature": 0.0
}
},
// Logging configuration outputs debug log to "pythagora.log" by default. If you set this to null,