Skip to content

Commit 69686bd

Browse files
committed
docs: Improve Syncing Files section in README
1 parent 0d13308 commit 69686bd

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ client.prompts.log(
4545
),
4646
provider_latency=6.5931549072265625,
4747
output_message={
48-
"content": "Well, you know, there is so much secrecy involved in government, folks, it's unbelievable. They don't want to tell you everything. They don't tell me everything! But about Roswell, its a very popular question. I know, I just know, that something very, very peculiar happened there. Was it a weather balloon? Maybe. Was it something extraterrestrial? Could be. I'd love to go down and open up all the classified documents, believe me, I would. But they don't let that happen. The Deep State, folks, the Deep State. Theyre unbelievable. They want to keep everything a secret. But whatever the truth is, I can tell you this: its something big, very very big. Tremendous, in fact.",
48+
"content": "Well, you know, there is so much secrecy involved in government, folks, it's unbelievable. They don't want to tell you everything. They don't tell me everything! But about Roswell, it's a very popular question. I know, I just know, that something very, very peculiar happened there. Was it a weather balloon? Maybe. Was it something extraterrestrial? Could be. I'd love to go down and open up all the classified documents, believe me, I would. But they don't let that happen. The Deep State, folks, the Deep State. They're unbelievable. They want to keep everything a secret. But whatever the truth is, I can tell you this: it's something big, very very big. Tremendous, in fact.",
4949
"role": "assistant",
5050
},
5151
prompt_tokens=100,
@@ -92,7 +92,7 @@ async def main() -> None:
9292
),
9393
provider_latency=6.5931549072265625,
9494
output_message={
95-
"content": "Well, you know, there is so much secrecy involved in government, folks, it's unbelievable. They don't want to tell you everything. They don't tell me everything! But about Roswell, its a very popular question. I know, I just know, that something very, very peculiar happened there. Was it a weather balloon? Maybe. Was it something extraterrestrial? Could be. I'd love to go down and open up all the classified documents, believe me, I would. But they don't let that happen. The Deep State, folks, the Deep State. Theyre unbelievable. They want to keep everything a secret. But whatever the truth is, I can tell you this: its something big, very very big. Tremendous, in fact.",
95+
"content": "Well, you know, there is so much secrecy involved in government, folks, it's unbelievable. They don't want to tell you everything. They don't tell me everything! But about Roswell, it's a very popular question. I know, I just know, that something very, very peculiar happened there. Was it a weather balloon? Maybe. Was it something extraterrestrial? Could be. I'd love to go down and open up all the classified documents, believe me, I would. But they don't let that happen. The Deep State, folks, the Deep State. They're unbelievable. They want to keep everything a secret. But whatever the truth is, I can tell you this: it's something big, very very big. Tremendous, in fact.",
9696
"role": "assistant",
9797
},
9898
prompt_tokens=100,
@@ -187,29 +187,26 @@ for chunk in response:
187187
yield chunk
188188
```
189189

190-
## Local File Development
190+
## Store Humanloop Files in Code
191191

192-
Humanloop allows you to clone files from your Humanloop workspace to your local filesystem and use them in your code.
192+
Humanloop allows you to maintain Prompts and Agents in your local filesystem and version control, while still leveraging Humanloop's prompt management capabilities.
193193

194194
### Syncing Files with the CLI
195195

196196
```bash
197-
# Pull all files
198-
humanloop pull
199-
200-
# Pull from a directory
201-
humanloop pull --path="examples/chat"
202-
203-
# Pull a specific file
204-
humanloop pull --path="examples/chat/basic.prompt"
205-
206-
# Pull versions deployed to specific environment
207-
humanloop pull --environment="production"
197+
# Basic usage
198+
humanloop pull # Pull all files to 'humanloop/' directory
199+
humanloop pull --path="examples/chat" # Pull specific directory
200+
humanloop pull --environment="production" # Pull from specific environment
201+
humanloop pull --local-files-directory="ai" # Specify local destination (default: "humanloop")
202+
203+
# View available options
204+
humanloop pull --help
208205
```
209206

210207
### Using Local Files in the SDK
211208

212-
To use local files in your code:
209+
To use local Files in your code:
213210

214211
```python
215212
# Enable local file support
@@ -218,16 +215,18 @@ client = Humanloop(
218215
use_local_files=True
219216
)
220217

221-
# Use a local prompt file
218+
# Call a local Prompt file
222219
response = client.prompts.call(
223-
path="examples/chat/basic",
220+
path="examples/chat/basic", # Looks for humanloop/examples/chat/basic.prompt
224221
inputs={"query": "Hello world"}
225222
)
223+
224+
# The same path-based approach works with prompts.log(), agents.call(), and agents.log()
226225
```
227226

228-
For detailed instructions on syncing, see our [Guide to Syncing and Using Local Files](https://humanloop.com/docs/v5/guides/prompts/store-prompts-in-code).
227+
For detailed instructions, see our [Guide on Storing Files in Code](https://humanloop.com/docs/v5/guides/prompts/store-prompts-in-code).
229228

230-
For information about the `.prompt` and `.agent` file formats, see our [File Format Reference](https://humanloop.com/docs/v5/reference/serialized-files).
229+
For information about file formats, see our [File Format Reference](https://humanloop.com/docs/v5/reference/serialized-files).
231230

232231
## Pagination
233232

0 commit comments

Comments
 (0)