Skip to content

Commit e6a6065

Browse files
authored
Fix typos (#222)
Signed-off-by: Ed Snible <[email protected]>
1 parent ff06d40 commit e6a6065

File tree

6 files changed

+15
-26
lines changed

6 files changed

+15
-26
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If applicable, add screenshots to help explain your problem.
2121

2222
**Desktop (please complete the following information):**
2323
- OS: [e.g. iOS]
24-
- Browser [e.g. chrome, safari]
24+
- Browser [e.g. Chrome, Safari]
2525
- Version [e.g. 22]
2626

2727
**Additional context**

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export WATSONX_APIKEY="your-api-key"
9898
export WATSONX_PROJECT_ID="your-project-id"
9999
```
100100

101-
If you use Replicate:
101+
If you use [Replicate](https://replicate.com/):
102102
```bash
103103
export REPLICATE_API_TOKEN="your-token"
104104
```
@@ -123,7 +123,7 @@ VSCode setup for syntax highlighting and validation:
123123

124124
### Variable Definition & Template Usage
125125

126-
In this example we use external content imput.yaml and watonsx as a LLM provider.
126+
In this example we use external content _data.yaml_ and watsonx as an LLM provider.
127127

128128
```yaml
129129
description: Template with variables

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ In order to run these examples, you need to create a free account
5353
on Replicate, get an API key and store it in the environment variable:
5454
- `REPLICATE_API_TOKEN`
5555

56-
In order to use foundation models hosted on [Watsonx](https://www.ibm.com/watsonx) via LiteLLM, you need a WatsonX account (a free plan is available) and set up the following environment variables:
57-
- `WATSONX_URL`, the API url (set to `https://{region}.ml.cloud.ibm.com`) of your WatsonX instance. The region can be found by clicking in the upper right corner of the Watsonx dashboard (for example a valid region is `us-south` ot `eu-gb`).
56+
In order to use foundation models hosted on [watsonx](https://www.ibm.com/watsonx) via LiteLLM, you need a WatsonX account (a free plan is available) and set up the following environment variables:
57+
- `WATSONX_URL`, the API url (set to `https://{region}.ml.cloud.ibm.com`) of your WatsonX instance. The region can be found by clicking in the upper right corner of the watsonx dashboard (for example a valid region is `us-south` ot `eu-gb`).
5858
- `WATSONX_APIKEY`, the API key (see information on [key creation](https://cloud.ibm.com/docs/account?topic=account-userapikey&interface=ui#create_user_key))
5959
- `WATSONX_PROJECT_ID`, the project hosting the resources (see information about [project creation](https://www.ibm.com/docs/en/watsonx/saas?topic=projects-creating-project) and [finding project ID](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-project-id.html?context=wx)).
6060

@@ -133,7 +133,7 @@ text:
133133
temperature: 0
134134
```
135135
136-
The `description` field is a description for the program. Field `text` contains a list of either strings or *block*s which together form the text to be produced. In this example, the text starts with the string `"Hello\n"` followed by a block that calls out to a model. In this case, it is model with id `replicate/ibm-granite/granite-20b-code-instruct-8k` on Replicate, via LiteLLM, with the indicated parameters: the stop sequence is `!`, and temperature set to `0`. Stop sequences are provided with a comman separated list of strings. The input to the model call is everything that has been produced so far in the program (here `"Hello\n"`).
136+
The `description` field is a description for the program. Field `text` contains a list of either strings or *block*s which together form the text to be produced. In this example, the text starts with the string `"Hello\n"` followed by a block that calls out to a model. In this case, it is model with id `replicate/ibm-granite/granite-20b-code-instruct-8k` on Replicate, via LiteLLM, with the indicated parameters: the stop sequence is `!`, and temperature set to `0`. Stop sequences are provided with a comma separated list of strings. The input to the model call is everything that has been produced so far in the program (here `"Hello\n"`).
137137

138138
When we execute this program using the PDL interpreter:
139139

docs/tutorial.md

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ In PDL, we can declaratively chain models together as in the following example (
119119
--8<-- "./examples/tutorial/model_chaining.pdl"
120120
```
121121

122-
In this program, the first call is to a granite model to complete the sentence `Hello, world!`. The following block in the document prints out the sentence: `Translate this to French`. The final line of the program takes the entire document produced so far and passes it as input to the granite multilingual model. Notice that the input passed to this model is the document up to that point, represented as a conversation. This makes it easy to chain models together and continue building on previous interactions.
122+
In this program, the first call is to a Granite model to complete the sentence `Hello, world!`. The following block in the document prints out the sentence: `Translate this to French`. The final line of the program takes the entire document produced so far and passes it as input to the Granite multilingual model. Notice that the input passed to this model is the document up to that point, represented as a conversation. This makes it easy to chain models together and continue building on previous interactions.
123123

124124
When we execute this program, we obtain:
125125

@@ -151,7 +151,7 @@ The translation of 'I love Paris!' to French is 'J'aime Paris!'.
151151
The translation of 'I love Madrid!' to Spanish is 'Me encanta Madrid!'.
152152
```
153153

154-
A function only contributes to the output document when it is called. So the definition itself results in `""`. When we call a function, we implicitly pass the current background context, and this is used as input to model calls inside the function body. In the above example, since the `input` field is omitted, the entire document produced at that point is passed as input to the granite model.
154+
A function only contributes to the output document when it is called. So the definition itself results in `""`. When we call a function, we implicitly pass the current background context, and this is used as input to model calls inside the function body. In the above example, since the `input` field is omitted, the entire document produced at that point is passed as input to the Granite model.
155155

156156
To reset the context when calling a function, we can pass the special argument: `pdl_context: []`.
157157

@@ -223,12 +223,12 @@ An `object` constructs an object:
223223
```
224224
object:
225225
name: Bob
226-
job: mananger
226+
job: manager
227227
```
228228

229229
This results in the following output:
230230
```
231-
{"name": "Bob", "job": "mananger"}
231+
{"name": "Bob", "job": "manager"}
232232
```
233233

234234
Each value in the object can be any PDL block, and the result is presented as an object.
@@ -328,7 +328,7 @@ PDL programs can contain calls to REST APIs with Python code. Consider a simple
328328
--8<-- "./examples/tutorial/calling_apis.pdl"
329329
```
330330

331-
In this program, we first define a query about the weather in some location (assigned to variable `QUERY`). The next block is a call to a granite model with few-shot examples to extract the location, which we assign to variable `LOCATION`. The next block makes an API call with Python (mocked in this example). Here the `LOCATION` is appended to the `url`. The result is a JSON object, which may be hard to interpret for a human user. So we make a final call to an LLM to interpret the JSON in terms of weather. Notice that many blocks have `contribute` set to `[]` to hide intermediate results.
331+
In this program, we first define a query about the weather in some location (assigned to variable `QUERY`). The next block is a call to a Granite model with few-shot examples to extract the location, which we assign to variable `LOCATION`. The next block makes an API call with Python (mocked in this example). Here the `LOCATION` is appended to the `url`. The result is a JSON object, which may be hard to interpret for a human user. So we make a final call to an LLM to interpret the JSON in terms of weather. Notice that many blocks have `contribute` set to `[]` to hide intermediate results.
332332

333333

334334
## Data Block
@@ -538,7 +538,7 @@ role: user
538538
```
539539
540540
In PDL, any block can be adorned with a `role` field indicating the role for that block. These are high-level annotations
541-
that help to make programs more portable accross different models. If the role of a block is not specified (except for model blocks that have `assistant` role),
541+
that help to make programs more portable across different models. If the role of a block is not specified (except for model blocks that have `assistant` role),
542542
then the role is inherited from the surrounding block. So in the above example, we only need to specify `role: user` at the top level (this is the default, so it doesn't
543543
need to be specified explicitly).
544544

@@ -607,7 +607,7 @@ the examples below:
607607
- `{list: {int: {minimum: 0}}}`: a list of integers satisfying the indicated constraints
608608
- `[{int: {minimum: 0}}]`: same as above
609609
- `{list: {minItems: 1, int: {}}}`, a list satisfying the indicated constraints
610-
- `{obj: {latitude: float, longitude: float}}`: an ibject with fields `latitude` and `longitude`
610+
- `{obj: {latitude: float, longitude: float}}`: an object with fields `latitude` and `longitude`
611611
- `{latitude: float, longitude: float}`: same as above
612612
- `{obj: {question: str, answer: str, context: {optional: str}}}`: an object with an optional field
613613
- `{question: str, answer: str, context: {optional: str}}`: same as above
@@ -931,13 +931,3 @@ Output:
931931
Several lines of text, with some "quotes" of various 'types'. Escapes (like \n) don't do anything.
932932
Newlines can be added by leaving a blank line. Additional leading whitespace is ignored.
933933
```
934-
935-
936-
937-
938-
939-
940-
941-
942-
943-

examples/cldk/cldk-assistant.pdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ text:
1414
from cldk import CLDK
1515
from cldk.models.java.models import *
1616

17-
# Initialize the Codellm-DevKit object with the project directory, langguage, and backend.
17+
# Initialize the Codellm-DevKit object with the project directory, language, and backend.
1818
cldk = CLDK("java")
1919
cldk_state = cldk.analysis(
2020
project_path="${ project }", # Change this to the path of the project you want to analyze.

examples/weather/weather.pdl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ text:
1919
- lang: python
2020
code: |
2121
import requests
22-
#result = requests.get('https://api.weatherapi.com/v1/current.json?key==XYZ=${ LOCATION }')
22+
#result = requests.get('https://api.weatherapi.com/v1/current.json?key==XYZ=${ LOCATION }').text
2323
#Mock result:
2424
result = '{"location": {"name": "Madrid", "region": "Madrid", "country": "Spain", "lat": 40.4, "lon": -3.6833, "tz_id": "Europe/Madrid", "localtime_epoch": 1732543839, "localtime": "2024-11-25 15:10"}, "current": {"last_updated_epoch": 1732543200, "last_updated": "2024-11-25 15:00", "temp_c": 14.4, "temp_f": 57.9, "is_day": 1, "condition": {"text": "Partly cloudy", "icon": "//cdn.weatherapi.com/weather/64x64/day/116.png", "code": 1003}, "wind_mph": 13.2, "wind_kph": 21.2, "wind_degree": 265, "wind_dir": "W", "pressure_mb": 1017.0, "pressure_in": 30.03, "precip_mm": 0.01, "precip_in": 0.0, "humidity": 77, "cloud": 75, "feelslike_c": 12.8, "feelslike_f": 55.1, "windchill_c": 13.0, "windchill_f": 55.4, "heatindex_c": 14.5, "heatindex_f": 58.2, "dewpoint_c": 7.3, "dewpoint_f": 45.2, "vis_km": 10.0, "vis_miles": 6.0, "uv": 1.4, "gust_mph": 15.2, "gust_kph": 24.4}}'
2525
def: WEATHER
@@ -29,4 +29,3 @@ text:
2929
input: |
3030
Explain the weather from the following JSON:
3131
${ WEATHER }
32-

0 commit comments

Comments
 (0)