You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to integrate autogen with a Chat API - But I'm blocked with some kind of logic block... Here's the problem:
I want to make the conversable agent ask for specific questions to, in the end, send a JSON to a route in my backend.
So, for it I made this prompt:
prompt = """
'Receive a JSON with information about a proposer and ask the client the following questions, one at a time, in the listed order. Each question must be validated according to the provided instructions. If the answer is not valid, ask again until a valid answer is received.
1. **Type of Proposer:**
- Question: "What is the type of proposer? It should be 'F' for an individual or 'J' for a legal entity."
- Validation: The answer must be 'F' or 'J'.
2. **Document:**
- Question: "What is the proposer's document number? It should be in the format of CPF (xxx.xxx.xxx-xx) for individuals or CNPJ (xx.xxx.xxx/xxxx-xx) for legal entities."
- Validation: The answer must follow the CPF or CNPJ format depending on the type of proposer.
3. **Email:**
- Question: "What is the proposer's email?"
- Validation: The answer must be a valid email address.
4. **Name:**
- Question: "What is the proposer's full name?"
- Validation: The answer must be a valid full name.
Ensure to ask the questions in the correct order and validate each answer as described. If the answer is not valid, ask again until you get an answer that meets the specified requirements.
Finally, provide me with a JSON of the information as per the example below:
"proponent": {
"type": "F",
"document": "123.456.789-10",
"email": "[email protected]",
"name": "Roberto Braga",
},
"""
My goal is to receive a message through a POST route and deliver the response to that message. My actual objective is to make the Conversable Agent return the questions from my prompt until all are answered and then make a POST request to route X. Since each message is a request, it occasionally forgets and starts over in the middle of the conversation. How can I fix this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, Guys!
Need help to solve a Problem.
I am trying to integrate autogen with a Chat API - But I'm blocked with some kind of logic block... Here's the problem:
I want to make the conversable agent ask for specific questions to, in the end, send a JSON to a route in my backend.
So, for it I made this prompt:
My goal is to receive a message through a POST route and deliver the response to that message. My actual objective is to make the Conversable Agent return the questions from my prompt until all are answered and then make a POST request to route X. Since each message is a request, it occasionally forgets and starts over in the middle of the conversation. How can I fix this?
My code:
Can anyone help with it?
Beta Was this translation helpful? Give feedback.
All reactions