Skip to content

A fix for countTokens and a dockerfile improvement#26

Merged
ericc-ch merged 2 commits intoericc-ch:masterfrom
filiptrplan:master
May 6, 2025
Merged

A fix for countTokens and a dockerfile improvement#26
ericc-ch merged 2 commits intoericc-ch:masterfrom
filiptrplan:master

Conversation

@filiptrplan
Copy link
Copy Markdown

@filiptrplan filiptrplan commented May 6, 2025

Without this fix I got a 500 error when trying to upload images because the input would be an array that contained the image and the text.

I also added a Dockerfile argument to use it with docker compose. Example usage:

  copilot:
    build:
      context: ./copilot-api
      dockerfile: Dockerfile
      args:
        GH_TOKEN: ${GH_TOKEN}
    container_name: copilot
    env_file:
      - .env
    ports:
      - "4141:4141"

@filiptrplan filiptrplan changed the title fix: prevent countTokens from counting images A fix for countTokens and a dockerfile improvement May 6, 2025
@ericc-ch
Copy link
Copy Markdown
Owner

ericc-ch commented May 6, 2025

looks good, thank you!
also I think this should close #27

@ericc-ch ericc-ch merged commit 22baa0e into ericc-ch:master May 6, 2025
hao1939 pushed a commit to hao1939/copilot-api that referenced this pull request Nov 22, 2025
A fix for countTokens and a dockerfile improvement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants