Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config instantiation without parameters #120

Open
Brad-Edwards opened this issue Nov 15, 2023 · 0 comments
Open

Config instantiation without parameters #120

Brad-Edwards opened this issue Nov 15, 2023 · 0 comments

Comments

@Brad-Edwards
Copy link

Brad-Edwards commented Nov 15, 2023

Steps to Reproduce:

  1. Run the following to llama_integration.ipynb: ! pip install python-dotenv llama-index council-ai
  2. Run all fields in notebook in order

Error:

AttributeError Traceback (most recent call last)
in <cell line: 15>()
13 dotenv.load_dotenv()
14 config = OpenAILLMConfiguration.from_env()
---> 15 config.model = Option("gpt-3.5-turbo")
16 llm = OpenAILLM(config)
17

AttributeError: can't set attribute 'model'

Cause:
Option.model is no longer exposed after OpenAILLMConfiguration refactor in #113

Proposed Fix:

config = OpenAILLMConfiguration(
api_key=os.getenv("OPENAI_API_KEY"), model="gpt-3.5-turbo"
)
llm = OpenAILLM(config)

@Brad-Edwards Brad-Edwards changed the title Read-only attribute accessed in integration example Config instatiation without parameters Nov 15, 2023
@Brad-Edwards Brad-Edwards changed the title Config instatiation without parameters Config instantiation without parameters Nov 15, 2023
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 a pull request may close this issue.

1 participant