Fix init to accept kwargs
This commit is contained in:
4
hello.py
4
hello.py
@@ -9,8 +9,8 @@ class EchoConfig(PrecompiledConfig):
|
|||||||
class EchoAgent(PrecompiledAgent):
|
class EchoAgent(PrecompiledAgent):
|
||||||
config: EchoConfig
|
config: EchoConfig
|
||||||
|
|
||||||
def __init__(self, config: EchoConfig, **kwargs): # <-- Add **kwargs
|
def __init__(self, config: EchoConfig, **kwargs):
|
||||||
super().__init__(config, **kwargs) # <-- Pass them through
|
super().__init__(config, **kwargs)
|
||||||
|
|
||||||
def forward(self, text: str) -> str:
|
def forward(self, text: str) -> str:
|
||||||
return f"Echo: {text}"
|
return f"Echo: {text}"
|
||||||
|
|||||||
Reference in New Issue
Block a user