-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python Conversation http Quickstart #1146
Conversation
Signed-off-by: Fernando Rocha <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @rochabr just a couple small things. TY
|
||
This quickstart includes one app: | ||
|
||
- `conversation.py`, responsible for sending an input to the underlying LLM and retrieving an output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `conversation.py`, responsible for sending an input to the underlying LLM and retrieving an output. | |
- `app.py`, responsible for sending an input to the underlying LLM and retrieving an output. |
dapr stop -f . | ||
``` | ||
|
||
<!-- END_STEP --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rochabr can you add a section to run the app without the mutli app run files? You can copy most of the text from the other Python one, but we should always have an option for Dapr CLI only.
base_url = os.getenv('BASE_URL', 'http://localhost') + ':' + os.getenv( | ||
'DAPR_HTTP_PORT', '3500') | ||
|
||
CONVERSATION_NAME = 'echo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we name this something better than Conversation? Maybe CONVERSATION_COMPONENT_NAME
? or something
data = result.json() | ||
output = data["outputs"][0]["result"] | ||
|
||
logging.info('Input sent: What is dapr?') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would also suggest to move this printline up to just after line 26
Signed-off-by: Fernando Rocha <[email protected]>
Description
Creating Conversation Quickstart for Python - HTTP
Issue reference
Please reference the issue this PR will close: #1108
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: