matdombrock / sllm

A command line interface for the OpenAI LLMs.
https://www.npmjs.com/package/sllm
GNU General Public License v3.0
39 stars 3 forks source link

Prompt is `undefined` when reading from a file. #4

Closed mathieuDombrockTAF closed 1 year ago

mathieuDombrockTAF commented 1 year ago
$ sllm What is wrong with this GH workflow file? -f .github/workflows/docs.yml -v
>> ```
name: Generate Typedoc Docs

on:
  push:
    branches:
      - dev/apidoc
jobs:
  build-api-docs:
    uses: turnaroundfactor/adapt-apidoc-build/.github/workflows/action.yml@master
    runs-on: ubuntu-latest
    env:
      NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    permissions:
      contents: read
      packages: read

undefined << { "maxTokens": 256, "temperature": 0.2, "model": "gpt-3.5-turbo", "file": ".github/workflows/docs.yml", "verbose": true, "history": 0 } Encoded Tokens: 156 Total Potential Tokens: 412 Sending Prompt...

Thinking... { model: 'gpt-3.5-turbo', messages: [ { role: 'user', content: '\r\n' + 'name: Generate Typedoc Docs\n' + '\n' + 'on:\n' + ' push:\n' + ' branches:\n' + ' - dev/apidoc\n' + 'jobs:\n' + ' build-api-docs:\n' + ' uses: turnaroundfactor/adapt-apidoc-build/.github/workflows/action.yml@master\n' + ' runs-on: ubuntu-latest\n' + ' env:\n' + ' NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n' + ' permissions:\n' + ' contents: read\n' + ' packages: read\n' + '\r\n' + 'undefined' } ], max_tokens: 256, temperature: 0.2, stream: false }

This is a GitHub Actions workflow that generates Typedoc documentation when changes are pushed to the dev/apidoc branch. It uses a custom action turnaroundfactor/adapt-apidoc-build to build the documentation and runs on the ubuntu-latest environment. The NODE_AUTH_TOKEN environment variable is set to the secrets.GITHUB_TOKEN so that the action can access the repository. The permissions field specifies that the action needs read access to the repository contents and packages.

matdombrock commented 1 year ago

Fixed