Upload intrinsic README.
Browse files
README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
# stembolts Intrinsic Adapter
|
| 2 |
|
| 3 |
-
This intrinsic adapter is designed to analyze
|
| 4 |
|
| 5 |
## Training Data
|
| 6 |
|
| 7 |
-
The training dataset consists of JSONL formatted
|
| 8 |
|
| 9 |
### Examples
|
| 10 |
|
|
@@ -54,7 +54,7 @@ from mellea.backends.adapters.adapter import CustomGraniteCommonAdapter
|
|
| 54 |
from mellea.stdlib.components.intrinsic import Intrinsic
|
| 55 |
|
| 56 |
|
| 57 |
-
_INTRINSIC_MODEL_ID = "
|
| 58 |
_INTRINSIC_ADAPTER_NAME = "stembolts"
|
| 59 |
|
| 60 |
|
|
@@ -68,23 +68,23 @@ class StemboltsAdapter(CustomGraniteCommonAdapter):
|
|
| 68 |
|
| 69 |
|
| 70 |
class StemboltsIntrinsic(Intrinsic, SimpleComponent):
|
| 71 |
-
def __init__(self,
|
| 72 |
Intrinsic.__init__(self, intrinsic_name=_INTRINSIC_ADAPTER_NAME)
|
| 73 |
SimpleComponent.__init__(self, mechanic_notes=mechanic_notes)
|
| 74 |
|
| 75 |
def format_for_llm(self):
|
| 76 |
return SimpleComponent.format_for_llm(self)
|
| 77 |
|
| 78 |
-
async def async_Stembolts(
|
| 79 |
# Backend.add_adapter should be idempotent, but we'll go ahead and check just in case.
|
| 80 |
if adapter.qualified_name not in backend.list_adapters():
|
| 81 |
backend.add_adapter(StemboltsAdapter(backend.base_model_name))
|
| 82 |
-
action = StemboltsIntrinsic("Stembolts",
|
| 83 |
mot = await backend.generate_from_context(action, ctx)
|
| 84 |
return mot
|
| 85 |
|
| 86 |
|
| 87 |
-
def Stembolts(
|
| 88 |
# Backend.add_adapter should be idempotent, but we'll go ahead and check just in case.
|
| 89 |
adapter = StemboltsAdapter(backend.base_model_name)
|
| 90 |
if adapter.qualified_name not in backend.list_adapters():
|
|
|
|
| 1 |
# stembolts Intrinsic Adapter
|
| 2 |
|
| 3 |
+
This intrinsic adapter is designed to analyze text descriptions of automotive issues and predict potential defective parts along with their diagnostic likelihood.
|
| 4 |
|
| 5 |
## Training Data
|
| 6 |
|
| 7 |
+
The training dataset consists of JSONL formatted strings, each containing a plain string describing an automotive issue (item) and a corresponding predicted defective part with associated diagnostic likelihood.
|
| 8 |
|
| 9 |
### Examples
|
| 10 |
|
|
|
|
| 54 |
from mellea.stdlib.components.intrinsic import Intrinsic
|
| 55 |
|
| 56 |
|
| 57 |
+
_INTRINSIC_MODEL_ID = "nfulton/stembolts"
|
| 58 |
_INTRINSIC_ADAPTER_NAME = "stembolts"
|
| 59 |
|
| 60 |
|
|
|
|
| 68 |
|
| 69 |
|
| 70 |
class StemboltsIntrinsic(Intrinsic, SimpleComponent):
|
| 71 |
+
def __init__(self, description: str):
|
| 72 |
Intrinsic.__init__(self, intrinsic_name=_INTRINSIC_ADAPTER_NAME)
|
| 73 |
SimpleComponent.__init__(self, mechanic_notes=mechanic_notes)
|
| 74 |
|
| 75 |
def format_for_llm(self):
|
| 76 |
return SimpleComponent.format_for_llm(self)
|
| 77 |
|
| 78 |
+
async def async_Stembolts(description: str, ctx: Context, backend: Backend | AdapterMixin):
|
| 79 |
# Backend.add_adapter should be idempotent, but we'll go ahead and check just in case.
|
| 80 |
if adapter.qualified_name not in backend.list_adapters():
|
| 81 |
backend.add_adapter(StemboltsAdapter(backend.base_model_name))
|
| 82 |
+
action = StemboltsIntrinsic("Stembolts", description: str)
|
| 83 |
mot = await backend.generate_from_context(action, ctx)
|
| 84 |
return mot
|
| 85 |
|
| 86 |
|
| 87 |
+
def Stembolts(description: str, ctx: Context, backend: Backend | AdapterMixin):
|
| 88 |
# Backend.add_adapter should be idempotent, but we'll go ahead and check just in case.
|
| 89 |
adapter = StemboltsAdapter(backend.base_model_name)
|
| 90 |
if adapter.qualified_name not in backend.list_adapters():
|