platisd / sycophant

Opinionated articles based on the latest news; a churnalist's wet dream
MIT License
4 stars 0 forks source link

Environment setup and api key #1

Open dackdel opened 4 months ago

dackdel commented 4 months ago

hey just having trouble setting up the environment there are conflicts with the versions of pip-openai / pip-pillow pip-bs4 that needs to be installed. Also where do you setup the keys for newsapi and openapi.

platisd commented 4 months ago

Hi, some questions to help me help you. :}

  1. Can you please point out the exact errors you are getting?
  2. Where are you trying to run this? On your local machine or some CI environment (e.g. GitHub Actions)?
  3. Are you using a virtual environment (e.g. venv)?
  4. Have you checked the robots.army setup for inspiration or copy-pasting if you are running things on GitHub Actions?
dackdel commented 4 months ago
  1. just cant figure out where to enter the api keys. i have them both ready. another error i was getting was version error for multiple libraries, openai, bs4, pillow, pandas. but i think i have that sorted now.
  2. on my mac.
  3. not using venv using default env
  4. yes i have its amazing. i however dont want the image generation and want to use multiple sources of news. have you seen https://www.newsminimalist.com/?
platisd commented 4 months ago

OK I see. So you pass the API keys to the Python script as command line arguments. For example, I am borrowing this from the robots.army setup:

python sycophant.py \
  --openai-api-key "REPLACE_WITH_YOUR_OPENAI_API_KEY" \
  --news-api-key "REPLACE_WITH_YOUR_NEWS_API_KEY" \
  --config path/to/your/sycophant-config.yml

Is this what you were looking for?