rhohndorf / Auto-Llama-cpp

Uses Auto-GPT with Llama.cpp
MIT License
384 stars 68 forks source link

remove openai dependency and fix type errors so scripts run. move model path to config to remove hardcoded values #6

Closed thomasfifer closed 1 year ago

thomasfifer commented 1 year ago

Background

The current state of the repo cannot be run by anyone who wants to try out auto-llama. This commit contains the changes necessary to make that happen with a fresh install.

Changes

All references to the openAI package have been removed. This included removing the dalle image generation and reworking the token counter.

There are a few locations where runtime errors were caused by type errors. These runtime errors were the result of changing the llm library from openAI to llama where library functions didn't exactly match up with the same return or parameter types. Issues here are llama_cpp max_tokens requires an Int and create_embedding returned a dict instead of a list of floats.

The llama model_path was hardcoded to the dev's file path. This should be part of the env file (well, there's a lot of other "better" directions that could be taken here, but this will work best for now).

PR Quality Checklist

LoireLab commented 1 year ago

Great minds think alike :)