(no commit message)

This commit is contained in:
2025-12-20 17:25:13 -08:00
parent a725a33c8b
commit 604479613b
7 changed files with 53 additions and 2 deletions

View File

@@ -1,2 +0,0 @@
# summarizer

0
__init__.py Normal file
View File

4
auto_classes.json Normal file
View File

@@ -0,0 +1,4 @@
{
"AutoConfig": "modaic.PrecompiledConfig",
"AutoProgram": "summarizer.Summarizer"
}

3
config.json Normal file
View File

@@ -0,0 +1,3 @@
{
"model": null
}

28
program.json Normal file
View File

@@ -0,0 +1,28 @@
{
"predict": {
"traces": [],
"train": [],
"demos": [],
"signature": {
"instructions": "Given the fields `input`, produce the fields `summary`.",
"fields": [
{
"prefix": "Input:",
"description": "${input}"
},
{
"prefix": "Summary:",
"description": "${summary}"
}
]
},
"lm": null
},
"metadata": {
"dependency_versions": {
"python": "3.11",
"dspy": "3.0.4",
"cloudpickle": "3.1"
}
}
}

7
pyproject.toml Normal file
View File

@@ -0,0 +1,7 @@
[project]
name = "summarizer"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = ["dspy>=3.0.4", "ipykernel>=7.1.0", "langfuse>=3.11.1", "modaic>=0.8.1", "modal>=1.3.0.post1", "openinference-instrumentation>=0.1.42", "openinference-instrumentation-dspy>=0.1.32"]

11
summarizer.py Normal file
View File

@@ -0,0 +1,11 @@
from modaic import PrecompiledProgram
import dspy
class Summarizer(PrecompiledProgram):
def __init__(self, **kwargs):
self.predict = dspy.Predict("input -> summary")
super().__init__(**kwargs)
def forward(self, input: str) -> str:
return self.predict(input=input)