From 35a155ab16e2781a161de0fd5e6942388b33ef11 Mon Sep 17 00:00:00 2001 From: Connor Shorten Date: Wed, 26 Nov 2025 19:25:53 -0500 Subject: [PATCH] My first commit --- auto_classes.json | 4 ++++ hello.py | 28 ++++++++++++++++++++++++++++ pyproject.toml | 7 +++++++ 3 files changed, 39 insertions(+) create mode 100644 auto_classes.json create mode 100644 hello.py create mode 100644 pyproject.toml diff --git a/auto_classes.json b/auto_classes.json new file mode 100644 index 0000000..6685e21 --- /dev/null +++ b/auto_classes.json @@ -0,0 +1,4 @@ +{ + "AutoConfig": "hello.EchoConfig", + "AutoAgent": "hello.EchoAgent" +} \ No newline at end of file diff --git a/hello.py b/hello.py new file mode 100644 index 0000000..3150ae3 --- /dev/null +++ b/hello.py @@ -0,0 +1,28 @@ +from modaic import PrecompiledAgent, PrecompiledConfig +from dotenv import load_dotenv + +load_dotenv() + +class EchoConfig(PrecompiledConfig): + lm: str = "gpt-4o" + +class EchoAgent(PrecompiledAgent): + config: EchoConfig + + def __init__(self, config: EchoConfig): + super().__init__(config) + + def forward(self, text: str) -> str: + return f"Echo: {text}" + + +# This block only runs when you execute the script directly, +# NOT when modaic imports the module +if __name__ == "__main__": + agent = EchoAgent(EchoConfig()) + print(agent(text="hello")) + agent.push_to_hub( + "connor/CrossEncoderRanker", + with_code=True, + commit_message="My first commit" + ) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..a7d5bba --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[project] +name = "CrossEncoderRanker" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.11" +dependencies = ["modaic>=0.4.1", "weaviate-client>=4.18.1"]