Skip to content

Commit 2d7fc3e

Browse files
author
Michael Jones
committed
feat(dspy): Merge branch 'main' into feat/remove-get_convo-asserts
2 parents 738ea87 + bae2ad8 commit 2d7fc3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2605
-993
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ To make this more systematic and much more powerful, **DSPy** does two things. F
3838

3939
### Table of Contents
4040

41-
If you need help thinking about your task, we recently created a [Discord server](https://discord.gg/VzS6RHHK6F) for the community.
41+
If you need help thinking about your task, we recently created a [Discord server](https://discord.gg/XCGy2WDCQB) for the community.
4242

4343
1. **[Installation](#1-installation)**
4444
1. **[Tutorials & Documentation](#2-documentation)**
@@ -61,7 +61,7 @@ Ditto! **DSPy** gives you the right general-purpose modules (e.g., `ChainOfThoug
6161

6262
**What if I have a better idea for prompting or synthetic data generation?** Perfect. We encourage you to think if it's best expressed as a module or an optimizer, and we'd love to merge it in DSPy so everyone can use it. DSPy is not a complete project; it's an ongoing effort to create structure (modules and optimizers) in place of hacky prompt and pipeline engineering tricks.
6363

64-
**What does DSPy stand for?** It's a long story but the backronym now is **D**eclarative **S**elf-improving Language **P**rograms, p**y**thonically.
64+
**What does DSPy stand for?** It's a long story but the backronym now is **D**eclarative **S**elf-improving Language **P**rograms, p**y**thonically. We also go by **D**eclaratively **S**elf-improving **Py**thon, which is simpler :D
6565

6666
## 1) Installation
6767

docs/README.md

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,37 @@
22

33
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
44

5+
## Building docs locally
6+
7+
To build and test the documentation locally:
8+
9+
1. Navigate to the `docs` directory:
10+
```bash
11+
cd docs
12+
```
13+
14+
2. Install the necessary dependencies:
15+
```bash
16+
npm install
17+
```
18+
19+
3. Run the build command:
20+
```bash
21+
npm run build
22+
```
23+
24+
This will generate a static build of the documentation site in the `build` directory. You can then serve this directory to view the site locally. If you see the build failing make sure to fix it before pushing.
25+
26+
## Continuous Integration (CI) Build Checks
27+
28+
We have automated build checks set up in our CI pipeline to ensure the documentation builds successfully before merging changes. These checks:
29+
30+
1. Run the `npm run build` command
31+
2. Verify that the build completes without errors
32+
3. Help catch potential issues early in the development process
33+
34+
If the CI build check fails, please review your changes and ensure the documentation builds correctly locally before pushing updates.
35+
536
## Contributing to the `docs` Folder
637

738
This guide is for contributors looking to make changes to the documentation in the `dspy/docs` folder.
@@ -15,9 +46,4 @@ git subtree pull --prefix=docs https://github.com/krypticmouse/dspy-docs master
1546

1647
2. **Push your new changes on a new branch**: Feel free to add or edit existing documentation and open a PR for your changes. Once your PR is reviewed and approved, the changes will be ready to merge into main.
1748

18-
3. **Updating the website**: Once your changes are merged to main, they need to be pushed to the subtree repository that hosts the live documentation site. This step will eventually be done automatically, but for now, please run the following command to push the updated `docs` content to the website subtree repository:
19-
20-
```bash
21-
#Ensure you are in the top-level dspy/ folder
22-
git subtree push --prefix=docs https://github.com/krypticmouse/dspy-docs master
23-
```
49+
3. **Updating the website**: Once your changes are merged to main, the changes would be reflected on live websites usually in 5-15 mins.

docs/api/assertions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,14 @@ We can declare these validation checks through `dspy.Suggest` statements (as we
101101
dspy.Suggest(
102102
len(query) <= 100,
103103
"Query should be short and less than 100 characters",
104+
target_module=self.generate_query
104105
)
105106

106107
dspy.Suggest(
107108
validate_query_distinction_local(prev_queries, query),
108109
"Query should be distinct from: "
109110
+ "; ".join(f"{i+1}) {q}" for i, q in enumerate(prev_queries)),
111+
target_module=self.generate_query
110112
)
111113
```
112114

@@ -133,12 +135,14 @@ class SimplifiedBaleenAssertions(dspy.Module):
133135
dspy.Suggest(
134136
len(query) <= 100,
135137
"Query should be short and less than 100 characters",
138+
target_module=self.generate_query
136139
)
137140

138141
dspy.Suggest(
139142
validate_query_distinction_local(prev_queries, query),
140143
"Query should be distinct from: "
141144
+ "; ".join(f"{i+1}) {q}" for i, q in enumerate(prev_queries)),
145+
target_module=self.generate_query
142146
)
143147

144148
prev_queries.append(query)

0 commit comments

Comments
 (0)