generated from coulomb/repo-seed
Add activity-core LLM endpoint support
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
Factory for creating LLM adapters by provider name.
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
import os
|
||||
from typing import Optional, Dict, Any
|
||||
|
||||
from llm_connect.adapter import LLMAdapter
|
||||
from llm_connect.exceptions import LLMConfigurationError
|
||||
@@ -57,5 +58,10 @@ def create_adapter(
|
||||
return cls(model=model, api_key=api_key, system_prompt=system_prompt, **kwargs)
|
||||
elif provider == "claude-code":
|
||||
return cls(model=model, **kwargs)
|
||||
else:
|
||||
return cls(**kwargs)
|
||||
elif provider == "mock":
|
||||
mock_response = os.environ.get("LLM_CONNECT_MOCK_RESPONSE")
|
||||
if mock_response is not None and "mock_response" not in kwargs:
|
||||
kwargs["mock_response"] = mock_response
|
||||
return cls(**kwargs)
|
||||
else:
|
||||
return cls(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user