royerlab / napari-chatgpt

A napari plugin to process and analyse images with chatGPT!
BSD 3-Clause "New" or "Revised" License
238 stars 25 forks source link

chatgpt version control #50

Open cdsyou opened 4 months ago

cdsyou commented 4 months ago

Hi I can launch napari but not the chatgpt plugin

I get the following error message:

-> OmegaQWidget instantiated! \ Segmentation function signatures: # Classic segmentation is a simple thresholding method that can be used as a baseline and works in 2D, 3D and more dimensions. def classic_segmentation(image: ArrayLike, threshold_type: str = 'otsu', normalize: Optional[bool] = True, norm_range_low: Optional[float] = 1.0, norm_range_high: Optional[float] = 99.8, min_segment_size: int = 32, erosion_steps: int = 1, closing_steps: int = 1, opening_steps: int = 0, apply_watershed: bool = False, min_distance: int = 10) -> ArrayLike ``` -<< 1.89 milliseconds
\ Available functions:
-> classic_segmentation()
-<< 0.00 microseconds
\ Enumerating all OpenAI ChatGPT models:
\ Setting API key: 'OpenAI':
-> API key name: 'OPENAI_API_KEY'
-> API key is already set as an environment variable!
-<< 0.00 microseconds
-<< 311.99 milliseconds
-> could not convert string to float: '4o'

NoneType: None

I suspect this is because the code was launched before chatgpt 4o was launched and while before it was fine taking '4' from chatgpt4, it now cannot do the same as it is now '4o' instead.

How can I troubleshoot this problem?

royerloic commented 1 month ago

You probably have an old version of Omega, please update: the package:

pip install --upgrade napari napari-chatgpt

if that does not work, try making a fresh environment... If you are installing Omega directly from the napari interface. try to uninstall, reinstall, and, worst case a fresh napari bundle install...