dlouapre HF Staff commited on
Commit
f792c73
·
1 Parent(s): 5e475c2

Adding a "Using custom profiles" section in the readme.md

Browse files
Files changed (2) hide show
  1. .env.example +1 -1
  2. README.md +47 -0
.env.example CHANGED
@@ -12,4 +12,4 @@ HF_HOME=./cache
12
  HF_TOKEN=
13
 
14
  # To select a specific profile with custom instructions and tools, to be placed in profiles/<myprofile>/__init__.py
15
- REACHY_MINI_CUSTOM_PROFILE="stone"
 
12
  HF_TOKEN=
13
 
14
  # To select a specific profile with custom instructions and tools, to be placed in profiles/<myprofile>/__init__.py
15
+ REACHY_MINI_CUSTOM_PROFILE="example"
README.md CHANGED
@@ -144,6 +144,53 @@ By default, the app runs in console mode for direct audio interaction. Use the `
144
  | `stop_emotion` | Clear queued emotions. | Core install only. |
145
  | `do_nothing` | Explicitly remain idle. | Core install only. |
146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  ## Development workflow
148
  - Install the dev group extras: `uv sync --group dev` or `pip install -e .[dev]`.
149
  - Run formatting and linting: `ruff check .`.
 
144
  | `stop_emotion` | Clear queued emotions. | Core install only. |
145
  | `do_nothing` | Explicitly remain idle. | Core install only. |
146
 
147
+ ## Using custom profiles
148
+ You can create and run custom profiles with their dedicated instructions in the prompt, and a custom set of enabled tools.
149
+ For that, set the REACHY_MINI_CUSTOM_PROFILE environment variable.
150
+
151
+
152
+ The corresponding profile will be looked up as a subfolder of `src/reachy_mini_conversation_app/profiles/`.
153
+ A profile folder must contain at least a `instructions.txt` file with the custom instructions for the assistant and a `tools.txt` file listing the enabled tools (one per line).
154
+
155
+ If you don't set REACHY_MINI_CUSTOM_PROFILE, the `default` profile will be used.
156
+
157
+ ### Custom instructions
158
+ In the `instructions.txt` file, just enter your prompt instructions in plain text.
159
+ You can reuse some prompt parts from the prompt library in `src/reachy_mini_conversation_app/prompts/`.
160
+ For that, in `instructions.txt` just add a line like
161
+ ```
162
+ [passion_for_lobster_jokes]
163
+ ```
164
+ which will automatically load the prompt contained in `src/reachy_mini_conversation_app/prompts/passion_for_lobster_jokes.txt`.
165
+ or
166
+ ```
167
+ [identities/witty_identity]
168
+ ```
169
+ which will load the prompt contained in `src/reachy_mini_conversation_app/prompts/identities/witty_identity.txt`.
170
+
171
+ See the `example` profile in `src/reachy_mini_conversation_app/profiles/example/` as an example of a custom profile with instructions reusing prompt parts.
172
+
173
+ ### Enabling Tools
174
+
175
+ #### From the shared tools library
176
+ In the `tools.txt` file, just list the tools you want to enable for this profile, one per line.
177
+ You can comment out lines starting with `#`, to prevent certain tools from being enabled.
178
+ For example:
179
+ ```
180
+ dance
181
+ # head_tracking
182
+ ```
183
+ Those tools will be searched for in the shared tools library located in `src/reachy_mini_conversation_app/tools/`.
184
+
185
+ #### Local custom tools (to be written in Python)
186
+ You can also define custom tools specific to your profile. Just list them in the `tools.txt` file like the other tools.
187
+ Tools will be searched first in the local folder, where you can include files like `mytool.py`.
188
+ Those should be subclasses of `reachy_mini_conversation_app.tools.core_tools.Tool`.
189
+
190
+ See the `throw_stone.py` tool in the `src/reachy_mini_conversation_app/profiles/example/` profile as an example of a dummy custom tool.
191
+
192
+
193
+
194
  ## Development workflow
195
  - Install the dev group extras: `uv sync --group dev` or `pip install -e .[dev]`.
196
  - Run formatting and linting: `ruff check .`.