Update tool/coder.py
Browse files- tool/coder.py +2 -2
tool/coder.py
CHANGED
|
@@ -18,9 +18,9 @@ class codewriter(BaseTool):
|
|
| 18 |
"Useful to answer questions that require writing codes "
|
| 19 |
"return the usage and instruction of codes"
|
| 20 |
)
|
| 21 |
-
|
| 22 |
llm: BaseLanguageModel = None
|
| 23 |
-
def __init__(self):
|
| 24 |
super().__init__()
|
| 25 |
self.llm = ChatOpenAI(model="gpt-4o-2024-11-20",api_key=os.getenv("OPENAI_API_KEY"),
|
| 26 |
base_url=os.getenv("OPENAI_API_BASE"))
|
|
|
|
| 18 |
"Useful to answer questions that require writing codes "
|
| 19 |
"return the usage and instruction of codes"
|
| 20 |
)
|
| 21 |
+
openai_api_key: str = None
|
| 22 |
llm: BaseLanguageModel = None
|
| 23 |
+
def __init__(self,llm, openai_api_key):
|
| 24 |
super().__init__()
|
| 25 |
self.llm = ChatOpenAI(model="gpt-4o-2024-11-20",api_key=os.getenv("OPENAI_API_KEY"),
|
| 26 |
base_url=os.getenv("OPENAI_API_BASE"))
|