forked from fsndzomga/metadspy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1_exple_spec.yaml
More file actions
30 lines (28 loc) · 902 Bytes
/
1_exple_spec.yaml
File metadata and controls
30 lines (28 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
signature:
name: SentimentClassifierSignature
docstring: |
Classify the overall sentiment (positive, negative or neutral) of a short text.
inputs:
- name: text
kind: text # plain string
desc: "User-provided text to analyse"
outputs:
- name: sentiment
kind: choices # ‹choices› → Literal[…]
choices: [positive, negative, neutral]
desc: "Predicted sentiment label"
- name: confidence
kind: float
desc: "Model confidence in [0, 1]"
instructions: >
Respond with one sentiment label and a confidence score between 0 and 1.
module:
name: SentimentClassifier
type: Predict # DSPy.Predict
use: SentimentClassifierSignature
llm:
name: openai/gpt-4o-mini
provider: openai
api_key_env: OPENAI_API_KEY
temperature: 0.0 # deterministic
max_tokens: 1000