Skip to content

Chat window works, but IPython magics do not #1103

Closed
@sg-s

Description

@sg-s

Description

I installed jupyter, jupyterai and langchain-openai in a clean environment (using pixi). I entered my openAI api key and the chat window seems to work. however, using the %%ai magic in the notebook doesn't work

Reproduce

screenshot showing that the chat window works

Screenshot 2024-11-11 at 7 11 16 PM

screenshot showing that it knows about my openAI key:

Screenshot 2024-11-11 at 7 12 01 PM

error:

AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-QoS0U***************************************KCxR. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}

Expected behavior

it to not throw an authenticationerror

Context

jupyter = ">=1.1.1,<2"
jupyterlab = ">=4.2.5,<5"
jupyter-ai = ">=2.28.1,<3"
langchain-openai = ">=0.1.25,<0.2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs reported by users

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions