Skip to content

Commit

Permalink
chore: Fixup examples. (#132)
Browse files Browse the repository at this point in the history
## Proposed changes

* Move `examples/basicExamples/structuredOutputs` to
`examples/structuredOutputs` so that it becomes a workspace in the
monorepo.
* Remove unnecessary deps from examples
* Fixup structuredOutputs example to use the new syntax
  • Loading branch information
jmoseley authored Jan 17, 2025
1 parent ad3af8b commit f2bf1c7
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 193 deletions.
1 change: 0 additions & 1 deletion examples/blogWriter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"devDependencies": {
"@types/node": "^20.17.11",
"nodemon": "^3.1.9",
"prettier": "^3.0.0",
"tsx": "^4.19.2",
"typescript": "^5.0.0"
}
Expand Down
2 changes: 0 additions & 2 deletions examples/hackerNewsAnalyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
"devDependencies": {
"@types/node": "^20.17.11",
"nodemon": "^3.1.9",
"prettier": "^3.0.0",
"ts-node-dev": "^2.0.0",
"tsx": "^4.19.2",
"typescript": "^5.0.0"
}
Expand Down
1 change: 0 additions & 1 deletion examples/reflection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"devDependencies": {
"@types/node": "^20.17.11",
"nodemon": "^3.1.9",
"prettier": "^3.0.0",
"tsx": "^4.19.2",
"typescript": "^5.0.0"
}
Expand Down
1 change: 0 additions & 1 deletion examples/streaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"devDependencies": {
"@types/node": "^20.17.11",
"nodemon": "^3.1.9",
"prettier": "^3.0.0",
"tsx": "^4.19.2",
"typescript": "^5.0.0"
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ interface ExtractEntitiesBasicOutput {
const ExtractEntitiesBasic = gsx.Component<
ExtractEntitiesProps,
ExtractEntitiesBasicOutput
>(async ({ text }) => {
>("ExtractEntitiesBasic", ({ text }) => {
const prompt = `Please review the following text and extract all the people, places, and organizations mentioned.
<text>
${text}
</text>
Please return json with the following format:
{
"people": ["person1", "person2", "person3"],
Expand Down Expand Up @@ -61,13 +61,13 @@ type ExtractEntitiesOutput = z.infer<typeof ExtractEntitiesSchema>;
const ExtractEntities = gsx.Component<
ExtractEntitiesProps,
ExtractEntitiesOutput
>(async ({ text }) => {
>("ExtractEntities", ({ text }) => {
const prompt = `Please review the following text and extract all the people, places, and organizations mentioned.
<text>
${text}
</text>
Please return json with the following format:
{
"people": ["person1", "person2", "person3"],
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"devDependencies": {
"@types/node": "^20.17.11",
"nodemon": "^3.1.9",
"prettier": "^3.0.0",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
}
Expand Down
File renamed without changes.
Loading

0 comments on commit f2bf1c7

Please sign in to comment.