From 7e12aa43e7fcf33458048221d33e8a8b5d0e5486 Mon Sep 17 00:00:00 2001 From: ErikO <49541561+EJOOSTEROP@users.noreply.github.com> Date: Tue, 30 Jul 2024 21:09:18 -0400 Subject: [PATCH] Houskeeping (#6) * Add google API key example. * Update required Poetry elements. * Enable openai's gpt 4o mini * Updating reference to gpt4o * Removing falcon7b as standard because the api now returns an error. * Updating to use gpt4o (mini) --------- Co-authored-by: Erik Oosterop --- .env.example | 3 ++- README.md | 3 ++- pyproject.toml | 4 ++-- quke/conf/config.yaml | 2 +- quke/conf/experiment/openai.yaml | 2 +- quke/conf/experiment/openaihf.yaml | 2 +- quke/conf/llm/{gpt3-5.yaml => gpt4o.yaml} | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) rename quke/conf/llm/{gpt3-5.yaml => gpt4o.yaml} (90%) diff --git a/.env.example b/.env.example index fea42b9..6048e7e 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ OPENAI_API_KEY = "YOUR-KEY" HUGGINGFACEHUB_API_TOKEN = "YOUR-KEY" COHERE_API_KEY = "YOUR-KEY" -REPLICATE_API_TOKEN = "YOUR-KEY" \ No newline at end of file +REPLICATE_API_TOKEN = "YOUR-KEY" +GOOGLE_API_KEY = "YOUR-KEY" \ No newline at end of file diff --git a/README.md b/README.md index 96cb26c..606eeb5 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ poetry run quke +experiment=openai ``` uses an experiment file openai.yaml (see folder ./config/experiments) which specifies the LLM, embedding and questions to be used. It is equivalent to running: ```sh -poetry run quke embedding=openai llm=gpt3-5 question=eps +poetry run quke embedding=openai llm=gpt4o question=eps ``` Multiple experiments can be run at once as follows: @@ -256,6 +256,7 @@ The tool shares no information with me. * [![OpenAI][openai.com]][openai-url] * [![Replicate][replicate.com]][replicate-url]

+ * [![Hydra][hydra.com]][hydra-url] * [![LangChain][langchain.com]][langchain-url] diff --git a/pyproject.toml b/pyproject.toml index ac70e5e..de2ed01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,9 +6,9 @@ authors = ["Erik Oosterop"] maintainers = ["Erik Oosterop"] license = "MIT" readme = "README.md" -homepage = "" +homepage = "https://github.com/EJOOSTEROP/quke" repository = "https://github.com/EJOOSTEROP/quke" -documentation = "" +documentation = "https://github.com/EJOOSTEROP/quke" keywords = ["ML", "LLM", "compare", "chat", "semantic search"] diff --git a/quke/conf/config.yaml b/quke/conf/config.yaml index 05047ab..6fc56c5 100644 --- a/quke/conf/config.yaml +++ b/quke/conf/config.yaml @@ -6,7 +6,7 @@ embed_only: False defaults: - _self_ - - llm: falcon7b + - llm: cohere - embedding: huggingface - question: eps diff --git a/quke/conf/experiment/openai.yaml b/quke/conf/experiment/openai.yaml index 96502da..3279fa2 100644 --- a/quke/conf/experiment/openai.yaml +++ b/quke/conf/experiment/openai.yaml @@ -1,5 +1,5 @@ # @package _global_ defaults: - - override /llm: gpt3-5 + - override /llm: gpt4o - override /embedding: openai - override /question: eps \ No newline at end of file diff --git a/quke/conf/experiment/openaihf.yaml b/quke/conf/experiment/openaihf.yaml index b0999df..ad90eb9 100644 --- a/quke/conf/experiment/openaihf.yaml +++ b/quke/conf/experiment/openaihf.yaml @@ -1,5 +1,5 @@ # @package _global_ defaults: - - override /llm: gpt3-5 + - override /llm: gpt4o - override /embedding: huggingface - override /question: eps \ No newline at end of file diff --git a/quke/conf/llm/gpt3-5.yaml b/quke/conf/llm/gpt4o.yaml similarity index 90% rename from quke/conf/llm/gpt3-5.yaml rename to quke/conf/llm/gpt4o.yaml index 44e7271..7329565 100644 --- a/quke/conf/llm/gpt3-5.yaml +++ b/quke/conf/llm/gpt4o.yaml @@ -1,7 +1,7 @@ #type: OpenAI #import OpenAI maybe needed to set the API key, though langchain may just take it from env? module_name_llm: langchain.chat_models class_name_llm: ChatOpenAI -name: gpt-3.5-turbo-0301 +name: gpt-4o-mini llm_args: model_name: ${llm.name}