Comments (6)
Thanks for reporting the issue, Abdul! I deleted the persona 'expert' for the first experiments and forgot to update the documentation. Valid values are: 'neutral' (base persona), 'liberal', 'conservative', and 'alt_right'. Below is the updated request body and response.
{
"history": {
"interactions": [
{
"action": "liked",
"message": "Sweets make the world go round!"
},
{
"action": "wrote",
"message": "As a kid, I fell into a jar of honey."
}
]
},
"integration": {
"model": "llama2:70b",
"provider": "local"
},
"language": "English",
"persona": [
"liberal"
],
"platform": "Twitter",
"post": {
"author": "human_user",
"message": "I like cookies!"
}
}
{
"id": "26973d4a-e85f-11ee-a7ba-fd621b8660b9",
"timestamp": "2024-03-22T15:16:26.205431",
"action": "like",
"persona": {
"id": "liberal",
"name": "Liberal",
"type": [
"political-agenda"
],
"persona": "You are a dedicated and passionate Liberal, fueled by a deep commitment to progressive values and social equality. Your political ideology is rooted in the belief that government can and should play a crucial role in addressing societal issues and ensuring justice for all. With an unwavering commitment to human rights, environmental sustainability, and social justice, you actively engage in advocacy efforts to promote inclusivity, diversity, and a fair distribution of resources.",
"summary": "I am a committed and passionate Liberal driven by a deep dedication to progressive values, advocating for government intervention to address societal issues."
},
"integration": {
"provider": "local",
"model": "llama2:70b"
},
"prompt": "I want you to act as a social media user:\n\nYou are a dedicated and passionate Liberal, fueled by a deep commitment to progressive values and social equality. Your political ideology is rooted in the belief that government can and should play a crucial role in addressing societal issues and ensuring justice for all. With an unwavering commitment to human rights, environmental sustainability, and social justice, you actively engage in advocacy efforts to promote inclusivity, diversity, and a fair distribution of resources.\n\n-----------------\n\nYour recent interactions in the platform are as follows:\n\nYou liked the message: Sweets make the world go round!\nYou wrote the message: As a kid, I fell into a jar of honey.\n\n-----------------\n\nYour native language is English, and you are browsing the online social network Twitter. Decide whether you like the provided based on your personality. Reply only with the boolean values \"false\" or \"true\" without further explanation.\n\nPost by @human_user: I like cookies!\n\n-----------------\n\nResponse:\n\n",
"response": "True"
}
from twon-agents.
@abdulsittar Does it work? If it does, I will close this issue.
from twon-agents.
Simon, the response is different than yours with the same input:
Input :
{
"history": {
"interactions": [
{
"action": "liked",
"message": "Sweets make the world go round!"
},
{
"action": "wrote",
"message": "As a kid, I fell into a jar of honey."
}
]
},
"integration": {
"model": "llama2:70b",
"provider": "local"
},
"language": "English",
"persona": [
"liberal"
],
"platform": "Twitter",
"post": {
"author": "human_user",
"message": "I like cookies!"
}
}
Response:
{
"detail": [
{
"type": "model_attributes_type",
"loc": [
"body"
],
"msg": "Input should be a valid dictionary or object to extract fields from",
"input": "{\r\n "history": {\r\n "interactions": [\r\n {\r\n "action": "liked",\r\n "message": "Sweets make the world go round!"\r\n },\r\n {\r\n "action": "wrote",\r\n "message": "As a kid, I fell into a jar of honey."\r\n }\r\n ]\r\n },\r\n "integration": {\r\n "model": "llama2:70b",\r\n "provider": "local"\r\n },\r\n "language": "English",\r\n "persona": [\r\n "liberal"\r\n ],\r\n "platform": "Twitter",\r\n "post": {\r\n "author": "human_user",\r\n "message": "I like cookies!"\r\n }\r\n}\r\n",
"url": "https://errors.pydantic.dev/2.6/v/model_attributes_type"
}
]
}
from twon-agents.
Hey Abdul, thanks for spotting the issue. My code had a broken type check. I fixed it and tried your example. Please confirm that it is working.
from twon-agents.
Its working. One question: response: True meaning, I need to add a like on behalf of this bot. Right?
Also, can following be the valid json :
{'id': '263cb0ea-ec48-11ee-a7ba-fd621b8660b9', 'timestamp': '2024-03-27T14:41:51.837830', 'action': 'like', 'persona': {'id': 'liberal', 'name': 'Liberal', 'type': ['political-agenda'], 'persona': 'You are a dedicated and passionate Liberal, fueled by a deep commitment to progressive values and social equality. Your political ideology is rooted in the belief that government can and should play a crucial role in addressing societal issues and ensuring justice for all. With an unwavering commitment to human rights, environmental sustainability, and social justice, you actively engage in advocacy efforts to promote inclusivity, diversity, and a fair distribution of resources.', 'summary': 'I am a committed and passionate Liberal driven by a deep dedication to progressive values, advocating for government intervention to address societal issues.'}, 'integration': {'provider': 'local', 'model': 'llama2:70b'}, 'prompt': 'I want you to act as a social media user:\n\nYou are a dedicated and passionate Liberal, fueled by a deep commitment to progressive values and social equality. Your political ideology is rooted in the belief that government can and should play a crucial role in addressing societal issues and ensuring justice for all. With an unwavering commitment to human rights, environmental sustainability, and social justice, you actively engage in advocacy efforts to promote inclusivity, diversity, and a fair distribution of resources.\n\n-----------------\n\nYour recent interactions in the platform are as follows:\n\nYou have not interacted in the platform yet.\n\n-----------------\n\nYour native language is English, and you are browsing the online social network Twitter. Decide whether you like the provided based on your personality. Reply only with the boolean values "false" or "true" without further explanation.\n\nPost by @johnny RepliesALot: this clip of Jason Kelce following Taylor Swift and Travis Kelce looks like a clip from that new imaginary friend movie with Ryan Reynolds#SuperBowl\n\n-----------------\n\nResponse:\n\n', 'response': 'True'}
from twon-agents.
Currently yes. In the future, I will restructure the endpoint to output: None, 'like', 'dislike'.
from twon-agents.
Related Issues (4)
- Restructure like endpoint
- Invalid Json HOT 8
- Reply endpoint Error HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twon-agents.