Skip to content

Config instantiation without parameters #120

@Brad-Edwards

Description

@Brad-Edwards

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions