Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

Apply ruff fix

Isaac Miller89036644d457
diff --git a/dsp/modules/__init__.py b/dsp/modules/__init__.py
index 06e1d6f07..fdf59eabc 100644
--- a/dsp/modules/__init__.py
+++ b/dsp/modules/__init__.py
@@ -1,3 +1,4 @@
+from .anthropic import Claude
from .azure_openai import AzureOpenAI
from .bedrock import *
from .cache_utils import *
@@ -13,4 +14,3 @@ from .ollama import *
from .pyserini import *
from .sbert import *
from .sentence_vectorizer import *
-from .anthropic import Claude
diff --git a/dsp/modules/anthropic.py b/dsp/modules/anthropic.py
index 859e43665..68f30ce7a 100644
--- a/dsp/modules/anthropic.py
+++ b/dsp/modules/anthropic.py
@@ -1,10 +1,10 @@
+import logging
import os
+from typing import Any, Optional
+
import backoff
-import json
-from typing import Optional, Any
from dsp.modules.lm import LM
-import logging
try:
import anthropic
@@ -41,7 +41,7 @@ class Claude(LM):
model: str = "claude-instant-1.2",
api_key: Optional[str] = None,
api_base: Optional[str] = None,
- **kwargs
+ **kwargs,
):
super().__init__(model)