remove previous interface
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"AutoConfig": "src.codex_dspy.agent.CodexAgentConfig",
|
"AutoConfig": "src.codex_dspy.agent.CodexModuleConfig",
|
||||||
"AutoAgent": "src.codex_dspy.agent.CodexModule"
|
"AutoAgent": "src.codex_dspy.agent.CodexModule"
|
||||||
}
|
}
|
||||||
6
main.py
6
main.py
@@ -1,13 +1,13 @@
|
|||||||
from src.codex_dspy.agent import CodexModule, CodexAgentConfig
|
from src.codex_dspy.agent import CodexModule, CodexModuleConfig
|
||||||
|
|
||||||
codex_agent = CodexModule(CodexAgentConfig())
|
codex_agent = CodexModule(CodexModuleConfig())
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
codex_agent.push_to_hub(
|
codex_agent.push_to_hub(
|
||||||
"darinkishore/codex-agent",
|
"darinkishore/codex-agent",
|
||||||
with_code=True,
|
with_code=True,
|
||||||
commit_message="update readme",
|
commit_message="remove previous interface",
|
||||||
)
|
)
|
||||||
# result = codex_agent(message="What files are in this directory?")
|
# result = codex_agent(message="What files are in this directory?")
|
||||||
# print(result.answer) # String response
|
# print(result.answer) # String response
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ def _is_str_type(annotation: Any) -> bool:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
class CodexAgentConfig(PrecompiledConfig):
|
class CodexModuleConfig(PrecompiledConfig):
|
||||||
signature: str | type[Signature] = "message:str -> answer:str"
|
signature: str | type[Signature] = "message:str -> answer:str"
|
||||||
working_directory: str = "."
|
working_directory: str = "."
|
||||||
model: Optional[str] = "gpt-4o"
|
model: Optional[str] = "gpt-4o"
|
||||||
@@ -83,9 +83,9 @@ class CodexModule(PrecompiledAgent):
|
|||||||
>>> print(result.report.severity) # typed access
|
>>> print(result.report.severity) # typed access
|
||||||
"""
|
"""
|
||||||
|
|
||||||
config: CodexAgentConfig
|
config: CodexModuleConfig
|
||||||
|
|
||||||
def __init__(self, config: CodexAgentConfig, **kwargs):
|
def __init__(self, config: CodexModuleConfig, **kwargs):
|
||||||
super().__init__(config, **kwargs)
|
super().__init__(config, **kwargs)
|
||||||
|
|
||||||
# Ensure signature is valid
|
# Ensure signature is valid
|
||||||
|
|||||||
Reference in New Issue
Block a user