Skip to content

"Building LLM-Powered Apps / Tokenization in action: converting text to tokens" Notebook with errors #132

@DiogenesBR

Description

@DiogenesBR

There two errors that I saw.

First when doing the Pip install

Second on the command

# start logging to W&B
autolog({"project":"llmapps", "job_type": "introduction"})

It returns the message:

wandb: Appending key for api.wandb.ai to your netrc file: /root/.netrc
Tracking run with wandb version 0.16.0
Run data is saved locally in /content/wandb/run-20231121_221839-lqzaro56
Syncing run [wobbly-resonance-2](https://wandb.ai/diogenesdirkx/llmapps/runs/lqzaro56) to [Weights & Biases](https://wandb.ai/diogenesdirkx/llmapps) ([docs](https://wandb.me/run))
View project at https://wandb.ai/diogenesdirkx/llmapps
View run at https://wandb.ai/diogenesdirkx/llmapps/runs/lqzaro56
---------------------------------------------------------------------------
APIRemovedInV1                            Traceback (most recent call last)
[<ipython-input-5-eb9c3ebdd66a>](https://localhost:8080/#) in <cell line: 2>()
      1 # start logging to W&B
----> 2 autolog({"project":"llmapps", "job_type": "introduction"})

5 frames
[/usr/local/lib/python3.10/dist-packages/openai/lib/_old_api.py](https://localhost:8080/#) in __load__(self)
     31     @override
     32     def __load__(self) -> None:
---> 33         raise APIRemovedInV1(symbol=self._symbol)
     34 
     35 

APIRemovedInV1: 

You tried to access openai.Edit, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.

You can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface. 

Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28`

A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions