Skip to content

Instantly share code, notes, and snippets.

@dglazkov
Last active August 5, 2023 04:10
Show Gist options
  • Select an option

  • Save dglazkov/dd3f071260a1c3b97aa81beac6045da3 to your computer and use it in GitHub Desktop.

Select an option

Save dglazkov/dd3f071260a1c3b97aa81beac6045da3 to your computer and use it in GitHub Desktop.

Revisions

  1. dglazkov revised this gist Aug 5, 2023. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions news-summarizer.json
    Original file line number Diff line number Diff line change
    @@ -8,20 +8,20 @@
    },
    {
    "from": "secrets-5",
    "to": "textCompletion-4",
    "to": "generateText-4",
    "constant": true,
    "out": "PALM_KEY",
    "in": "PALM_KEY"
    },
    {
    "from": "textCompletion-4",
    "from": "generateText-4",
    "to": "output-6",
    "out": "completion",
    "in": "summary"
    },
    {
    "from": "promptTemplate-1",
    "to": "textCompletion-4",
    "to": "generateText-4",
    "out": "prompt",
    "in": "text"
    },
    @@ -58,8 +58,8 @@
    }
    },
    {
    "id": "textCompletion-4",
    "type": "textCompletion"
    "id": "generateText-4",
    "type": "generateText"
    },
    {
    "id": "secrets-5",
  2. dglazkov revised this gist Aug 5, 2023. 1 changed file with 13 additions and 13 deletions.
    26 changes: 13 additions & 13 deletions news-summarizer.json
    Original file line number Diff line number Diff line change
    @@ -2,32 +2,32 @@
    "edges": [
    {
    "from": "input-2",
    "to": "prompt-template-1",
    "to": "promptTemplate-1",
    "out": "topic",
    "in": "topic"
    },
    {
    "from": "secrets-5",
    "to": "text-completion-4",
    "to": "textCompletion-4",
    "constant": true,
    "out": "API_KEY",
    "in": "API_KEY"
    "out": "PALM_KEY",
    "in": "PALM_KEY"
    },
    {
    "from": "text-completion-4",
    "from": "textCompletion-4",
    "to": "output-6",
    "out": "completion",
    "in": "summary"
    },
    {
    "from": "prompt-template-1",
    "to": "text-completion-4",
    "from": "promptTemplate-1",
    "to": "textCompletion-4",
    "out": "prompt",
    "in": "text"
    },
    {
    "from": "slot-3",
    "to": "prompt-template-1",
    "to": "promptTemplate-1",
    "out": "headlines",
    "in": "headlines"
    },
    @@ -40,8 +40,8 @@
    ],
    "nodes": [
    {
    "id": "prompt-template-1",
    "type": "prompt-template",
    "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"
    }
    @@ -58,15 +58,15 @@
    }
    },
    {
    "id": "text-completion-4",
    "type": "text-completion"
    "id": "textCompletion-4",
    "type": "textCompletion"
    },
    {
    "id": "secrets-5",
    "type": "secrets",
    "configuration": {
    "keys": [
    "API_KEY"
    "PALM_KEY"
    ]
    }
    },
  3. dglazkov created this gist Jul 28, 2023.
    83 changes: 83 additions & 0 deletions news-summarizer.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,83 @@
    {
    "edges": [
    {
    "from": "input-2",
    "to": "prompt-template-1",
    "out": "topic",
    "in": "topic"
    },
    {
    "from": "secrets-5",
    "to": "text-completion-4",
    "constant": true,
    "out": "API_KEY",
    "in": "API_KEY"
    },
    {
    "from": "text-completion-4",
    "to": "output-6",
    "out": "completion",
    "in": "summary"
    },
    {
    "from": "prompt-template-1",
    "to": "text-completion-4",
    "out": "prompt",
    "in": "text"
    },
    {
    "from": "slot-3",
    "to": "prompt-template-1",
    "out": "headlines",
    "in": "headlines"
    },
    {
    "from": "input-2",
    "to": "slot-3",
    "out": "topic",
    "in": "topic"
    }
    ],
    "nodes": [
    {
    "id": "prompt-template-1",
    "type": "prompt-template",
    "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": "text-completion-4",
    "type": "text-completion"
    },
    {
    "id": "secrets-5",
    "type": "secrets",
    "configuration": {
    "keys": [
    "API_KEY"
    ]
    }
    },
    {
    "id": "output-6",
    "type": "output"
    }
    ],
    "kits": [
    {
    "url": "npm:@google-labs/llm-starter"
    }
    ]
    }