updated structured output for sentiment
This commit is contained in:
parent
a1cd2a0b06
commit
7c5602543d
@ -12,9 +12,14 @@ class Category(str, Enum):
|
||||
TECHNOLOGICAL_DEVELOPMENTS = "Technological Developments"
|
||||
WHALE_EXCHANGE_ACTIVITY = "Whale & Exchange Activity"
|
||||
|
||||
class Sentiment(str, Enum):
|
||||
POSITIVE = "Positive"
|
||||
NEUTRAL = "Neutral"
|
||||
NEGATIVE = "Negative"
|
||||
|
||||
class ArticleClassification(BaseModel):
|
||||
category: Category
|
||||
sentiment: int
|
||||
sentiment: Sentiment
|
||||
|
||||
class ArticleAnalyzer:
|
||||
def __init__(self):
|
||||
@ -28,7 +33,7 @@ class ArticleAnalyzer:
|
||||
- Technological Developments
|
||||
- Whale & Exchange Activity
|
||||
|
||||
Also, assign a sentiment (1 for Positive, -1 for Negative, or 0 for Neutral).
|
||||
Also, assign a sentiment (Positive, Neutral or Negative)
|
||||
"""
|
||||
print(f"This JSON model is going to be used for structured ouput classification : {ArticleClassification.model_json_schema()}")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user