Spaces:
Runtime error
Runtime error
Download backend/integrations/llm/base.py from Amitkasar/ai-api-testing: direct link, hf CLI and curl.
- Browser
- Download file 229 Bytes
-
https://huggingface.co/spaces/Amitkasar/ai-api-testing/resolve/main/backend/integrations/llm/base.py
- Command line
-
hf download hf://spaces/Amitkasar/ai-api-testing/backend/integrations/llm/base.py
-
curl -L -o base.py https://huggingface.co/spaces/Amitkasar/ai-api-testing/resolve/main/backend/integrations/llm/base.py
229 Bytes
| from abc import ABC, abstractmethod | |
| class BaseLLMClient(ABC): | |
| def invoke(self, messages) -> tuple[str, dict | None]: | |
| """Invoke the LLM. Returns (content_str, token_usage_or_None).""" | |
| ... | |