Farzad-R / LLM-Zero-to-Hundred

This repository contains different LLM chatbot projects (RAG, LLM agents, etc.) and well-known techniques for training and fine tuning LLMs.
278 stars 148 forks source link

Where is cfg.py #20

Closed gordingin closed 14 hours ago

gordingin commented 1 day ago

Hi, directions say the following

  1. Configuration and Execution Navigate to the config directory. Open cfg.py and fill in your GPT API credentials.

There is a configs folder but no config folder. I can create on and a file but what format is cfg.py in?

thx Ralph

Farzad-R commented 18 hours ago

Thanks for pointing it out. I changed the project structure and forgot to update the readmefile. I just updated it. Here is the correct instructions:

  1. Configuration and Execution

If you're using OpenAI directly:

OPENAI_API_KEY=

If you're using Azure OpenAI:

OPENAI_API_TYPE=
OPENAI_API_VERSION=
OPENAI_API_KEY=
OPENAI_API_BASE=
gpt_deployment_name=
embed_deployment_name=
Farzad-R commented 18 hours ago

Important Notes:

gordingin commented 15 hours ago

I added the OPENAI key and now receive the error below. Since you make a comment that thing need to change and not sure how to do that, I will try to get the Azure Keys instead...

AttributeError: 'NoneType' object has no attribute 'lower' Traceback: File "/Users/ralph.krausse/git/LLM-Zero-to-Hundred/WebGPT/WebGPT_env/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script exec(code, module.dict) File "/Users/ralph.krausse/git/LLM-Zero-to-Hundred/WebGPT/src/webgpt_app.py", line 103, in first_llm_response = Apputils.ask_llm_function_caller( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ralph.krausse/git/LLM-Zero-to-Hundred/WebGPT/src/utils/app_utils.py", line 97, in ask_llm_function_caller response = openai.ChatCompletion.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ralph.krausse/git/LLM-Zero-to-Hundred/WebGPT/WebGPT_env/lib/python3.11/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ralph.krausse/git/LLM-Zero-to-Hundred/WebGPT/WebGPT_env/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 149, in create ) = cls.prepare_create_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ralph.krausse/git/LLM-Zero-to-Hundred/WebGPT/WebGPT_env/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 80, in prepare_create_request typed_api_type = cls._get_api_type_and_version(api_type=api_type)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ralph.krausse/git/LLM-Zero-to-Hundred/WebGPT/WebGPT_env/lib/python3.11/site-packages/openai/api_resources/abstract/api_resource.py", line 169, in _get_api_type_and_version else ApiType.from_str(openai.api_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ralph.krausse/git/LLM-Zero-to-Hundred/WebGPT/WebGPT_env/lib/python3.11/site-packages/openai/util.py", line 35, in from_str if label.lower() == "azure": ^^^^^^^^^^^

Farzad-R commented 14 hours ago

yes, this error occurred because the system could not make a successful call to the models.