Skip to content

Instantly share code, notes, and snippets.

@dglazkov
Last active August 5, 2023 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dglazkov/dd3f071260a1c3b97aa81beac6045da3 to your computer and use it in GitHub Desktop.
Save dglazkov/dd3f071260a1c3b97aa81beac6045da3 to your computer and use it in GitHub Desktop.
A simple summarizer of news headlines.
{
"edges": [
{
"from": "input-2",
"to": "promptTemplate-1",
"out": "topic",
"in": "topic"
},
{
"from": "secrets-5",
"to": "generateText-4",
"constant": true,
"out": "PALM_KEY",
"in": "PALM_KEY"
},
{
"from": "generateText-4",
"to": "output-6",
"out": "completion",
"in": "summary"
},
{
"from": "promptTemplate-1",
"to": "generateText-4",
"out": "prompt",
"in": "text"
},
{
"from": "slot-3",
"to": "promptTemplate-1",
"out": "headlines",
"in": "headlines"
},
{
"from": "input-2",
"to": "slot-3",
"out": "topic",
"in": "topic"
}
],
"nodes": [
{
"id": "promptTemplate-1",
"type": "promptTemplate",
"configuration": {
"template": "Use the news headlines below to write a few sentences tosummarize the latest news on this topic:\n\n##Topic:\n{{topic}}\n\n## Headlines {{headlines}}\n\\n## Summary:\n"
}
},
{
"id": "input-2",
"type": "input"
},
{
"id": "slot-3",
"type": "slot",
"configuration": {
"slot": "news"
}
},
{
"id": "generateText-4",
"type": "generateText"
},
{
"id": "secrets-5",
"type": "secrets",
"configuration": {
"keys": [
"PALM_KEY"
]
}
},
{
"id": "output-6",
"type": "output"
}
],
"kits": [
{
"url": "npm:@google-labs/llm-starter"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment