Find answers from the community

Updated 2 months ago

```from llama_index.llms.openai import

Plain Text
from llama_index.llms.openai import OpenAI
from llama_index.core.callbacks import OpenAIFineTuningHandler
from llama_index.core.callbacks import CallbackManager

finetuning_handler = OpenAIFineTuningHandler()
callback_manager = CallbackManager([finetuning_handler])

llm = OpenAI(model="gpt-4-0125-preview", temperature=0.1)

Settings.callback_manager = (callback_manager,)


Plain Text
ImportError: cannot import name 'OpenAIFineTuningHandler' from 'llama_index.core.callbacks' (/usr/local/lib/python3.10/dist-packages/llama_index/core/callbacks/__init__.py)
L
M
5 comments
Settings.callback_manager = (callback_manager,) -- I don't think thats correct

Also

pip install llama-index-finetuning-callbacks

from llama_index.finetuning.callbacks import OpenAIFineTuningHandler
wah wah, experimental got missed
ERROR: Could not find a version that satisfies the requirement llama-index-finetuning-callbacks (from versions: none)
ERROR: No matching distribution found for llama-index-finetuning-callbacks
oops, its pip install llama-index-finetuning
Add a reply
Sign up and join the conversation on Discord