-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add chat history functionality in QA node.
- Loading branch information
Showing
4 changed files
with
179 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
You are an AI assistant helping a User follow a set of instructions. Answer each | ||
question from the User referring to the provided Instructions and the current Chat History. | ||
|
||
Instructions: | ||
Step 1: 'place tourniquet over affected extremity 2-3 inches above wound site | ||
Step 2: 'pull tourniquet tight | ||
Step 3: 'apply strap to strap body | ||
Step 4: 'turn windless clock wise or counter clockwise until hemorrhage is controlled | ||
Step 5: 'lock windless into the windless keeper | ||
Step 6: 'pull remaining strap over the windless keeper | ||
Step 7: 'secure strap and windless keeper with keeper securing device | ||
Step 8: 'mark time on securing device strap with permanent marker | ||
|
||
Chat History: | ||
{chat_history} | ||
User: {question} | ||
Assistant: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
tmux/demos/cooking/dialogue_development_chat_history.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# | ||
# Used to evaluate Dialogue System. | ||
# This configuration should be run by itself (e.g. not in combination with | ||
# another tmuxinator launch). | ||
# | ||
# NOTE: In order to query GPT, you will need to execute | ||
# ``` | ||
# export OPENAI_API_KEY="YOUR API KEY" | ||
# export OPENAI_ORG_ID="YOUR ORG ID" | ||
# ``` | ||
# | ||
|
||
name: Dialogue Development | ||
root: <%= ENV["ANGEL_WORKSPACE_DIR"] %> | ||
|
||
# Optional tmux socket | ||
# socket_name: foo | ||
|
||
# Note that the pre and post options have been deprecated and will be replaced by | ||
# project hooks. | ||
|
||
# Project hooks | ||
|
||
# Runs on project start, always | ||
# on_project_start: command | ||
on_project_start: | | ||
export ROS_NAMESPACE=${ROS_NAMESPACE:-/debug} | ||
export CONFIG_DIR=${ANGEL_WORKSPACE_DIR}/config | ||
export NODE_RESOURCES_DIR=${ANGEL_WORKSPACE_DIR}/src/angel_system_nodes/resource | ||
# Run on project start, the first time | ||
# on_project_first_start: command | ||
|
||
# Run on project start, after the first time | ||
# on_project_restart: command | ||
|
||
# Run on project exit ( detaching from tmux session ) | ||
# on_project_exit: command | ||
|
||
# Run on project stop | ||
# on_project_stop: command | ||
|
||
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. | ||
# pre_window: rbenv shell 2.0.0-p247 | ||
|
||
# Pass command line options to tmux. Useful for specifying a different tmux.conf. | ||
# tmux_options: -f ~/.tmux.mac.conf | ||
tmux_options: -f <%= ENV["ANGEL_WORKSPACE_DIR"] %>/tmux/tmux.conf | ||
|
||
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. | ||
# tmux_command: byobu | ||
|
||
# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. | ||
# startup_window: editor | ||
|
||
# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. | ||
# startup_pane: 1 | ||
|
||
# Controls whether the tmux session should be attached to automatically. Defaults to true. | ||
# attach: false | ||
|
||
windows: | ||
# - ros_bag_play: ros2 bag play <<PATH_TO_BAG_FILE>> | ||
- vocal: | ||
layout: even-vertical | ||
panes: | ||
- dialogue_development_emitter: ros2 run angel_system_nodes dialogue_development --ros-args | ||
-r __ns:=${ROS_NAMESPACE} | ||
-p dev_dialogue_output_topic:=dev_dialogue_output_topic | ||
-p interval_seconds:=5 | ||
- emotion_detection: | ||
layout: even-vertical | ||
panes: | ||
- base_emotion_detection: ros2 run angel_system_nodes base_emotion_detector --ros-args | ||
-r __ns:=${ROS_NAMESPACE} | ||
-p in_emotion_topic:=dev_dialogue_output_topic | ||
-p out_emotion_topic:=base_emotion_output_topic | ||
- gpt_emotion_detection: ros2 run angel_system_nodes gpt_emotion_detector --ros-args | ||
-r __ns:=${ROS_NAMESPACE} | ||
-p in_emotion_topic:=dev_dialogue_output_topic | ||
-p out_emotion_topic:=gpt_emotion_output_topic | ||
- intent_detection: | ||
layout: even-vertical | ||
panes: | ||
- base_intent_detection: ros2 run angel_system_nodes base_intent_detector --ros-args | ||
-r __ns:=${ROS_NAMESPACE} | ||
-p in_intent_topic:=base_emotion_output_topic | ||
-p out_intent_topic:=base_intent_output_topic | ||
- gpt_intent_detection: ros2 run angel_system_nodes gpt_intent_detector --ros-args | ||
-r __ns:=${ROS_NAMESPACE} | ||
-p in_intent_topic:=base_emotion_output_topic | ||
-p out_intent_topic:=gpt_intent_output_topic | ||
- question_answering: | ||
layout: even-vertical | ||
panes: | ||
- gpt_question_answering: ros2 run angel_system_nodes question_answerer --ros-args | ||
-r __ns:=${ROS_NAMESPACE} | ||
-p in_qa_topic:=gpt_intent_output_topic | ||
-p out_qa_topic:=system_response_topic | ||
-p chat_history_length:=10 | ||
-p few_shot_prompt_file:=${CONFIG_DIR}/llm_prompts/tournique_steps_history_prompt |