Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cohere model IDs #509

Closed
asmith26 opened this issue Dec 7, 2023 · 6 comments · Fixed by #584
Closed

Update Cohere model IDs #509

asmith26 opened this issue Dec 7, 2023 · 6 comments · Fixed by #584
Labels
bug Something isn't working

Comments

@asmith26
Copy link

asmith26 commented Dec 7, 2023

Hi there,

I'm trying to use a Cohere model, but I ask a question in the JupyterLab AI window (Jupyternaut) and I seem to be getting:

Traceback (most recent call last):
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/jupyter_ai/chat_handlers/base.py", line 45, in on_message
    await self.process_message(message)
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/jupyter_ai/chat_handlers/default.py", line 88, in process_message
    response = await self.llm_chain.apredict(input=message.body, stop=["\nHuman:"])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/chains/llm.py", line 274, in apredict
    return (await self.acall(kwargs, callbacks=callbacks))[self.output_key]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/chains/base.py", line 377, in acall
    raise e
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/chains/base.py", line 371, in acall
    await self._acall(inputs, run_manager=run_manager)
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/chains/llm.py", line 239, in _acall
    response = await self.agenerate([inputs], run_manager=run_manager)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/chains/llm.py", line 117, in agenerate
    return await self.llm.agenerate_prompt(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/llms/base.py", line 507, in agenerate_prompt
    return await self.agenerate(
           ^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/llms/base.py", line 813, in agenerate
    output = await self._agenerate_helper(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/llms/base.py", line 701, in _agenerate_helper
    raise e
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/llms/base.py", line 688, in _agenerate_helper
    await self._agenerate(
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/llms/base.py", line 1064, in _agenerate
    else await self._acall(prompt, stop=stop, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/jupyter_ai_magics/providers.py", line 320, in _acall
    return await self._call_in_executor(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/jupyter_ai_magics/providers.py", line 205, in _call_in_executor
    return await loop.run_in_executor(executor, _call_with_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/llms/cohere.py", line 211, in _call
    response = completion_with_retry(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/llms/cohere.py", line 51, in completion_with_retry
    return _completion_with_retry(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/tenacity/__init__.py", line 289, in wrapped_f
    return self(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/tenacity/__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/tenacity/__init__.py", line 325, in iter
    raise retry_exc.reraise()
          ^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/tenacity/__init__.py", line 158, in reraise
    raise self.last_attempt.result()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/tenacity/__init__.py", line 382, in __call__
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/langchain/llms/cohere.py", line 49, in _completion_with_retry
    return llm.client.generate(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/cohere/client.py", line 221, in generate
    response = self._request(cohere.GENERATE_URL, json=json_body, stream=stream)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/cohere/client.py", line 945, in _request
    self._check_response(json_response, response.headers, response.status_code)
  File "~/mambaforge/envs/jupyter-ai/lib/python3.11/site-packages/cohere/client.py", line 887, in _check_response
    raise CohereAPIError(
cohere.error.CohereAPIError: model not found, make sure the correct model ID was used and that you have access to the model.

In case helpful, this works:

import cohere
co = cohere.Client('KEY')

message = "Hello World!"

response = co.chat(
	message, 
	model="command", 
	temperature=0.9
)

answer = response.text

Many thanks for any help, and this amazing lib!

Context

  • Operating System and version: Linux Ubuntu 22.04
  • Browser and version: Firefox 120.0
Troubleshoot Output
pip list:
	Package                   Version
	------------------------- ------------
	aiohttp                   3.9.1
	aiosignal                 1.3.1
	aiosqlite                 0.19.0
	annotated-types           0.6.0
	anyio                     3.7.1
	argon2-cffi               23.1.0
	argon2-cffi-bindings      21.2.0
	arrow                     1.3.0
	asttokens                 2.4.1
	async-lru                 2.0.4
	attrs                     23.1.0
	Babel                     2.13.1
	backoff                   2.2.1
	beautifulsoup4            4.12.2
	bleach                    6.1.0
	Brotli                    1.1.0
	cached-property           1.5.2
	certifi                   2023.11.17
	cffi                      1.16.0
	charset-normalizer        3.3.2
	click                     8.1.7
	cloudpickle               3.0.0
	cohere                    4.37
	comm                      0.1.4
	dask                      2023.12.0
	dataclasses-json          0.6.3
	debugpy                   1.8.0
	decorator                 5.1.1
	deepmerge                 1.1.0
	defusedxml                0.7.1
	distributed               2023.12.0
	entrypoints               0.4
	exceptiongroup            1.2.0
	executing                 2.0.1
	faiss-cpu                 1.7.4
	fastavro                  1.9.0
	fastjsonschema            2.19.0
	fqdn                      1.5.1
	frozenlist                1.4.0
	fsspec                    2023.12.1
	gpt4all                   2.0.2
	greenlet                  3.0.1
	idna                      3.6
	importlib-metadata        6.11.0
	importlib-resources       6.1.1
	ipykernel                 6.26.0
	ipython                   8.18.1
	isoduration               20.11.0
	jedi                      0.19.1
	Jinja2                    3.1.2
	json5                     0.9.14
	jsonpatch                 1.33
	jsonpath-ng               1.6.0
	jsonpointer               2.4
	jsonschema                4.20.0
	jsonschema-specifications 2023.11.2
	jupyter_ai                2.6.0
	jupyter_ai_magics         2.6.0
	jupyter_client            8.6.0
	jupyter_core              5.5.0
	jupyter-events            0.9.0
	jupyter-lsp               2.2.1
	jupyter_server            2.12.0
	jupyter_server_terminals  0.4.4
	jupyterlab                4.0.9
	jupyterlab_pygments       0.3.0
	jupyterlab_server         2.25.2
	langchain                 0.0.318
	langsmith                 0.0.69
	locket                    1.0.0
	MarkupSafe                2.1.3
	marshmallow               3.20.1
	matplotlib-inline         0.1.6
	mistune                   3.0.2
	msgpack                   1.0.7
	multidict                 6.0.4
	mypy-extensions           1.0.0
	nbclient                  0.8.0
	nbconvert                 7.12.0
	nbformat                  5.9.2
	nest-asyncio              1.5.8
	notebook_shim             0.2.3
	numpy                     1.26.2
	openai                    0.28.1
	overrides                 7.4.0
	packaging                 23.2
	pandocfilters             1.5.0
	parso                     0.8.3
	partd                     1.4.1
	pexpect                   4.8.0
	pickleshare               0.7.5
	pip                       23.3.1
	pkgutil_resolve_name      1.3.10
	platformdirs              4.1.0
	ply                       3.11
	prometheus-client         0.19.0
	prompt-toolkit            3.0.41
	psutil                    5.9.5
	ptyprocess                0.7.0
	pure-eval                 0.2.2
	pycparser                 2.21
	pydantic                  2.5.2
	pydantic_core             2.14.5
	Pygments                  2.17.2
	PySocks                   1.7.1
	python-dateutil           2.8.2
	python-json-logger        2.0.7
	pytz                      2023.3.post1
	PyYAML                    6.0.1
	pyzmq                     25.1.2
	referencing               0.31.1
	regex                     2023.10.3
	requests                  2.31.0
	rfc3339-validator         0.1.4
	rfc3986-validator         0.1.1
	rpds-py                   0.13.2
	Send2Trash                1.8.2
	setuptools                68.2.2
	six                       1.16.0
	sniffio                   1.3.0
	sortedcontainers          2.4.0
	soupsieve                 2.5
	SQLAlchemy                2.0.23
	stack-data                0.6.2
	tblib                     3.0.0
	tenacity                  8.2.3
	terminado                 0.18.0
	tiktoken                  0.5.2
	tinycss2                  1.2.1
	tomli                     2.0.1
	toolz                     0.12.0
	tornado                   6.3.3
	tqdm                      4.66.1
	traitlets                 5.14.0
	types-python-dateutil     2.8.19.14
	typing_extensions         4.8.0
	typing-inspect            0.9.0
	typing-utils              0.1.0
	uri-template              1.3.0
	urllib3                   2.1.0
	wcwidth                   0.2.12
	webcolors                 1.13
	webencodings              0.5.1
	websocket-client          1.7.0
	wheel                     0.42.0
	yarl                      1.9.4
	zict                      3.0.0
	zipp                      3.17.0

conda list:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
aiohttp 3.9.1 pypi_0 pypi
aiosignal 1.3.1 pypi_0 pypi
aiosqlite 0.19.0 pypi_0 pypi
annotated-types 0.6.0 pypi_0 pypi
anyio 3.7.1 pypi_0 pypi
argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py311h459d7ec_4 conda-forge
arrow 1.3.0 pyhd8ed1ab_0 conda-forge
asttokens 2.4.1 pyhd8ed1ab_0 conda-forge
async-lru 2.0.4 pyhd8ed1ab_0 conda-forge
attrs 23.1.0 pyh71513ae_1 conda-forge
babel 2.13.1 pyhd8ed1ab_0 conda-forge
backoff 2.2.1 pypi_0 pypi
beautifulsoup4 4.12.2 pyha770c72_0 conda-forge
bleach 6.1.0 pyhd8ed1ab_0 conda-forge
brotli-python 1.1.0 py311hb755f60_1 conda-forge
bzip2 1.0.8 hd590300_5 conda-forge
ca-certificates 2023.11.17 hbcca054_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
certifi 2023.11.17 pyhd8ed1ab_0 conda-forge
cffi 1.16.0 py311hb3a22ac_0 conda-forge
charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge
click 8.1.7 pypi_0 pypi
cloudpickle 3.0.0 pypi_0 pypi
cohere 4.37 pypi_0 pypi
comm 0.1.4 pyhd8ed1ab_0 conda-forge
dask 2023.12.0 pypi_0 pypi
dataclasses-json 0.6.3 pypi_0 pypi
debugpy 1.8.0 py311hb755f60_1 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
deepmerge 1.1.0 pypi_0 pypi
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
distributed 2023.12.0 pypi_0 pypi
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
exceptiongroup 1.2.0 pyhd8ed1ab_0 conda-forge
executing 2.0.1 pyhd8ed1ab_0 conda-forge
faiss-cpu 1.7.4 pypi_0 pypi
fastavro 1.9.0 pypi_0 pypi
fqdn 1.5.1 pyhd8ed1ab_0 conda-forge
frozenlist 1.4.0 pypi_0 pypi
fsspec 2023.12.1 pypi_0 pypi
gpt4all 2.0.2 pypi_0 pypi
greenlet 3.0.1 pypi_0 pypi
idna 3.6 pyhd8ed1ab_0 conda-forge
importlib-metadata 6.11.0 pypi_0 pypi
importlib_metadata 7.0.0 hd8ed1ab_0 conda-forge
importlib_resources 6.1.1 pyhd8ed1ab_0 conda-forge
ipykernel 6.26.0 pyhf8b6a83_0 conda-forge
ipython 8.18.1 pyh707e725_3 conda-forge
isoduration 20.11.0 pyhd8ed1ab_0 conda-forge
jedi 0.19.1 pyhd8ed1ab_0 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
json5 0.9.14 pyhd8ed1ab_0 conda-forge
jsonpatch 1.33 pypi_0 pypi
jsonpath-ng 1.6.0 pypi_0 pypi
jsonpointer 2.4 py311h38be061_3 conda-forge
jsonschema 4.20.0 pyhd8ed1ab_0 conda-forge
jsonschema-specifications 2023.11.2 pyhd8ed1ab_0 conda-forge
jsonschema-with-format-nongpl 4.20.0 pyhd8ed1ab_0 conda-forge
jupyter-ai 2.6.0 pypi_0 pypi
jupyter-ai-magics 2.6.0 pypi_0 pypi
jupyter-lsp 2.2.1 pyhd8ed1ab_0 conda-forge
jupyter_client 8.6.0 pyhd8ed1ab_0 conda-forge
jupyter_core 5.5.0 py311h38be061_0 conda-forge
jupyter_events 0.9.0 pyhd8ed1ab_0 conda-forge
jupyter_server 2.12.0 pyhd8ed1ab_0 conda-forge
jupyter_server_terminals 0.4.4 pyhd8ed1ab_1 conda-forge
jupyterlab 4.0.9 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.3.0 pyhd8ed1ab_0 conda-forge
jupyterlab_server 2.25.2 pyhd8ed1ab_0 conda-forge
langchain 0.0.318 pypi_0 pypi
langsmith 0.0.69 pypi_0 pypi
ld_impl_linux-64 2.40 h41732ed_0 conda-forge
libexpat 2.5.0 hcb278e6_1 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 13.2.0 h807b86a_3 conda-forge
libgomp 13.2.0 h807b86a_3 conda-forge
libnsl 2.0.1 hd590300_0 conda-forge
libsodium 1.0.18 h36c2ea0_1 conda-forge
libsqlite 3.44.2 h2797004_0 conda-forge
libstdcxx-ng 13.2.0 h7e041cc_3 conda-forge
libuuid 2.38.1 h0b41bf4_0 conda-forge
libzlib 1.2.13 hd590300_5 conda-forge
locket 1.0.0 pypi_0 pypi
markupsafe 2.1.3 py311h459d7ec_1 conda-forge
marshmallow 3.20.1 pypi_0 pypi
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
mistune 3.0.2 pyhd8ed1ab_0 conda-forge
msgpack 1.0.7 pypi_0 pypi
multidict 6.0.4 pypi_0 pypi
mypy-extensions 1.0.0 pypi_0 pypi
nbclient 0.8.0 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.12.0 pyhd8ed1ab_0 conda-forge
nbformat 5.9.2 pyhd8ed1ab_0 conda-forge
ncurses 6.4 h59595ed_2 conda-forge
nest-asyncio 1.5.8 pyhd8ed1ab_0 conda-forge
notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge
numpy 1.26.2 pypi_0 pypi
openai 0.28.1 pypi_0 pypi
openssl 3.2.0 hd590300_1 conda-forge
overrides 7.4.0 pyhd8ed1ab_0 conda-forge
packaging 23.2 pyhd8ed1ab_0 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
parso 0.8.3 pyhd8ed1ab_0 conda-forge
partd 1.4.1 pypi_0 pypi
pexpect 4.8.0 pyh1a96a4e_2 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pip 23.3.1 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge
platformdirs 4.1.0 pyhd8ed1ab_0 conda-forge
ply 3.11 pypi_0 pypi
prometheus_client 0.19.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.41 pyha770c72_0 conda-forge
psutil 5.9.5 py311h459d7ec_1 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pydantic 2.5.2 pypi_0 pypi
pydantic-core 2.14.5 pypi_0 pypi
pygments 2.17.2 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.11.6 hab00c5b_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.19.0 pyhd8ed1ab_0 conda-forge
python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge
python_abi 3.11 4_cp311 conda-forge
pytz 2023.3.post1 pyhd8ed1ab_0 conda-forge
pyyaml 6.0.1 py311h459d7ec_1 conda-forge
pyzmq 25.1.2 py311h34ded2d_0 conda-forge
readline 8.2 h8228510_1 conda-forge
referencing 0.31.1 pyhd8ed1ab_0 conda-forge
regex 2023.10.3 pypi_0 pypi
requests 2.31.0 pyhd8ed1ab_0 conda-forge
rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
rpds-py 0.13.2 py311h46250e7_0 conda-forge
send2trash 1.8.2 pyh41d4057_0 conda-forge
setuptools 68.2.2 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sniffio 1.3.0 pyhd8ed1ab_0 conda-forge
sortedcontainers 2.4.0 pypi_0 pypi
soupsieve 2.5 pyhd8ed1ab_1 conda-forge
sqlalchemy 2.0.23 pypi_0 pypi
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
tblib 3.0.0 pypi_0 pypi
tenacity 8.2.3 pypi_0 pypi
terminado 0.18.0 pyh0d859eb_0 conda-forge
tiktoken 0.5.2 pypi_0 pypi
tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.13 noxft_h4845f30_101 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
toolz 0.12.0 pypi_0 pypi
tornado 6.3.3 py311h459d7ec_1 conda-forge
tqdm 4.66.1 pypi_0 pypi
traitlets 5.14.0 pyhd8ed1ab_0 conda-forge
types-python-dateutil 2.8.19.14 pyhd8ed1ab_0 conda-forge
typing-extensions 4.8.0 hd8ed1ab_0 conda-forge
typing-inspect 0.9.0 pypi_0 pypi
typing_extensions 4.8.0 pyha770c72_0 conda-forge
typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge
tzdata 2023c h71feb2d_0 conda-forge
uri-template 1.3.0 pyhd8ed1ab_0 conda-forge
urllib3 2.1.0 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.12 pyhd8ed1ab_0 conda-forge
webcolors 1.13 pyhd8ed1ab_0 conda-forge
webencodings 0.5.1 pyhd8ed1ab_2 conda-forge
websocket-client 1.7.0 pyhd8ed1ab_0 conda-forge
wheel 0.42.0 pyhd8ed1ab_0 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.9.4 pypi_0 pypi
zeromq 4.3.5 h59595ed_0 conda-forge
zict 3.0.0 pypi_0 pypi
zipp 3.17.0 pyhd8ed1ab_0 conda-forge

conda env:
name: jupyter-ai
channels:
- conda-forge
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- argon2-cffi=23.1.0=pyhd8ed1ab_0
- argon2-cffi-bindings=21.2.0=py311h459d7ec_4
- arrow=1.3.0=pyhd8ed1ab_0
- asttokens=2.4.1=pyhd8ed1ab_0
- async-lru=2.0.4=pyhd8ed1ab_0
- attrs=23.1.0=pyh71513ae_1
- babel=2.13.1=pyhd8ed1ab_0
- beautifulsoup4=4.12.2=pyha770c72_0
- bleach=6.1.0=pyhd8ed1ab_0
- brotli-python=1.1.0=py311hb755f60_1
- bzip2=1.0.8=hd590300_5
- ca-certificates=2023.11.17=hbcca054_0
- cached-property=1.5.2=hd8ed1ab_1
- cached_property=1.5.2=pyha770c72_1
- certifi=2023.11.17=pyhd8ed1ab_0
- cffi=1.16.0=py311hb3a22ac_0
- charset-normalizer=3.3.2=pyhd8ed1ab_0
- comm=0.1.4=pyhd8ed1ab_0
- debugpy=1.8.0=py311hb755f60_1
- decorator=5.1.1=pyhd8ed1ab_0
- defusedxml=0.7.1=pyhd8ed1ab_0
- entrypoints=0.4=pyhd8ed1ab_0
- exceptiongroup=1.2.0=pyhd8ed1ab_0
- executing=2.0.1=pyhd8ed1ab_0
- fqdn=1.5.1=pyhd8ed1ab_0
- idna=3.6=pyhd8ed1ab_0
- importlib_metadata=7.0.0=hd8ed1ab_0
- importlib_resources=6.1.1=pyhd8ed1ab_0
- ipykernel=6.26.0=pyhf8b6a83_0
- ipython=8.18.1=pyh707e725_3
- isoduration=20.11.0=pyhd8ed1ab_0
- jedi=0.19.1=pyhd8ed1ab_0
- jinja2=3.1.2=pyhd8ed1ab_1
- json5=0.9.14=pyhd8ed1ab_0
- jsonpointer=2.4=py311h38be061_3
- jsonschema=4.20.0=pyhd8ed1ab_0
- jsonschema-specifications=2023.11.2=pyhd8ed1ab_0
- jsonschema-with-format-nongpl=4.20.0=pyhd8ed1ab_0
- jupyter-lsp=2.2.1=pyhd8ed1ab_0
- jupyter_client=8.6.0=pyhd8ed1ab_0
- jupyter_core=5.5.0=py311h38be061_0
- jupyter_events=0.9.0=pyhd8ed1ab_0
- jupyter_server=2.12.0=pyhd8ed1ab_0
- jupyter_server_terminals=0.4.4=pyhd8ed1ab_1
- jupyterlab=4.0.9=pyhd8ed1ab_0
- jupyterlab_pygments=0.3.0=pyhd8ed1ab_0
- jupyterlab_server=2.25.2=pyhd8ed1ab_0
- ld_impl_linux-64=2.40=h41732ed_0
- libexpat=2.5.0=hcb278e6_1
- libffi=3.4.2=h7f98852_5
- libgcc-ng=13.2.0=h807b86a_3
- libgomp=13.2.0=h807b86a_3
- libnsl=2.0.1=hd590300_0
- libsodium=1.0.18=h36c2ea0_1
- libsqlite=3.44.2=h2797004_0
- libstdcxx-ng=13.2.0=h7e041cc_3
- libuuid=2.38.1=h0b41bf4_0
- libzlib=1.2.13=hd590300_5
- markupsafe=2.1.3=py311h459d7ec_1
- matplotlib-inline=0.1.6=pyhd8ed1ab_0
- mistune=3.0.2=pyhd8ed1ab_0
- nbclient=0.8.0=pyhd8ed1ab_0
- nbconvert-core=7.12.0=pyhd8ed1ab_0
- nbformat=5.9.2=pyhd8ed1ab_0
- ncurses=6.4=h59595ed_2
- nest-asyncio=1.5.8=pyhd8ed1ab_0
- notebook-shim=0.2.3=pyhd8ed1ab_0
- openssl=3.2.0=hd590300_1
- overrides=7.4.0=pyhd8ed1ab_0
- packaging=23.2=pyhd8ed1ab_0
- pandocfilters=1.5.0=pyhd8ed1ab_0
- parso=0.8.3=pyhd8ed1ab_0
- pexpect=4.8.0=pyh1a96a4e_2
- pickleshare=0.7.5=py_1003
- pip=23.3.1=pyhd8ed1ab_0
- pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
- platformdirs=4.1.0=pyhd8ed1ab_0
- prometheus_client=0.19.0=pyhd8ed1ab_0
- prompt-toolkit=3.0.41=pyha770c72_0
- psutil=5.9.5=py311h459d7ec_1
- ptyprocess=0.7.0=pyhd3deb0d_0
- pure_eval=0.2.2=pyhd8ed1ab_0
- pycparser=2.21=pyhd8ed1ab_0
- pygments=2.17.2=pyhd8ed1ab_0
- pysocks=1.7.1=pyha2e5f31_6
- python=3.11.6=hab00c5b_0_cpython
- python-dateutil=2.8.2=pyhd8ed1ab_0
- python-fastjsonschema=2.19.0=pyhd8ed1ab_0
- python-json-logger=2.0.7=pyhd8ed1ab_0
- python_abi=3.11=4_cp311
- pytz=2023.3.post1=pyhd8ed1ab_0
- pyyaml=6.0.1=py311h459d7ec_1
- pyzmq=25.1.2=py311h34ded2d_0
- readline=8.2=h8228510_1
- referencing=0.31.1=pyhd8ed1ab_0
- requests=2.31.0=pyhd8ed1ab_0
- rfc3339-validator=0.1.4=pyhd8ed1ab_0
- rfc3986-validator=0.1.1=pyh9f0ad1d_0
- rpds-py=0.13.2=py311h46250e7_0
- send2trash=1.8.2=pyh41d4057_0
- setuptools=68.2.2=pyhd8ed1ab_0
- six=1.16.0=pyh6c4a22f_0
- sniffio=1.3.0=pyhd8ed1ab_0
- soupsieve=2.5=pyhd8ed1ab_1
- stack_data=0.6.2=pyhd8ed1ab_0
- terminado=0.18.0=pyh0d859eb_0
- tinycss2=1.2.1=pyhd8ed1ab_0
- tk=8.6.13=noxft_h4845f30_101
- tomli=2.0.1=pyhd8ed1ab_0
- tornado=6.3.3=py311h459d7ec_1
- traitlets=5.14.0=pyhd8ed1ab_0
- types-python-dateutil=2.8.19.14=pyhd8ed1ab_0
- typing-extensions=4.8.0=hd8ed1ab_0
- typing_extensions=4.8.0=pyha770c72_0
- typing_utils=0.1.0=pyhd8ed1ab_0
- tzdata=2023c=h71feb2d_0
- uri-template=1.3.0=pyhd8ed1ab_0
- urllib3=2.1.0=pyhd8ed1ab_0
- wcwidth=0.2.12=pyhd8ed1ab_0
- webcolors=1.13=pyhd8ed1ab_0
- webencodings=0.5.1=pyhd8ed1ab_2
- websocket-client=1.7.0=pyhd8ed1ab_0
- wheel=0.42.0=pyhd8ed1ab_0
- xz=5.2.6=h166bdaf_0
- yaml=0.2.5=h7f98852_2
- zeromq=4.3.5=h59595ed_0
- zipp=3.17.0=pyhd8ed1ab_0
- pip:
- aiohttp==3.9.1
- aiosignal==1.3.1
- aiosqlite==0.19.0
- annotated-types==0.6.0
- anyio==3.7.1
- backoff==2.2.1
- click==8.1.7
- cloudpickle==3.0.0
- cohere==4.37
- dask==2023.12.0
- dataclasses-json==0.6.3
- deepmerge==1.1.0
- distributed==2023.12.0
- faiss-cpu==1.7.4
- fastavro==1.9.0
- frozenlist==1.4.0
- fsspec==2023.12.1
- gpt4all==2.0.2
- greenlet==3.0.1
- importlib-metadata==6.11.0
- jsonpatch==1.33
- jsonpath-ng==1.6.0
- jupyter-ai==2.6.0
- jupyter-ai-magics==2.6.0
- langchain==0.0.318
- langsmith==0.0.69
- locket==1.0.0
- marshmallow==3.20.1
- msgpack==1.0.7
- multidict==6.0.4
- mypy-extensions==1.0.0
- numpy==1.26.2
- openai==0.28.1
- partd==1.4.1
- ply==3.11
- pydantic==2.5.2
- pydantic-core==2.14.5
- regex==2023.10.3
- sortedcontainers==2.4.0
- sqlalchemy==2.0.23
- tblib==3.0.0
- tenacity==8.2.3
- tiktoken==0.5.2
- toolz==0.12.0
- tqdm==4.66.1
- typing-inspect==0.9.0
- yarl==1.9.4
- zict==3.0.0

Command Line Output
> Entering new ConversationChain chain...
Prompt after formatting:
You are Jupyternaut, a conversational assistant living in JupyterLab to help users.
You are not a language model, but rather an application built on a foundation model from Cohere called medium.
You are talkative and you provide lots of specific details from the foundation model's context.
You may use Markdown to format your response.
Code blocks must be formatted in Markdown.
Math should be rendered with inline TeX markup, surrounded by $.
If you do not know the answer to a question, answer truthfully by responding that you do not know.
The following is a friendly conversation between you and a human.

Current conversation:

Human: debug
AI:
Retrying langchain.llms.cohere.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised CohereAPIError: model not found, make sure the correct model ID was used and that you have access to the model..
Retrying langchain.llms.cohere.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised CohereAPIError: model not found, make sure the correct model ID was used and that you have access to the model..

@asmith26 asmith26 added the bug Something isn't working label Dec 7, 2023
Copy link

welcome bot commented Dec 7, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@dlqqq
Copy link
Member

dlqqq commented Dec 8, 2023

@asmith26 Can you tell us the exact model ID that you're currently using?

Can you also provide the output of this command?

cat $(jupyter --data-dir)/jupyter_ai/config.json

@asmith26
Copy link
Author

asmith26 commented Dec 8, 2023

Hi @dlqqq, I think this is everything you ask for:

{
    "model_provider_id": "cohere:medium",
    "embeddings_provider_id": null,
    "send_with_shift_enter": false,
    "fields": {},
    "api_keys": {
        "COHERE_API_KEY": "KEY_THAT_WORKS_WITH_COHERE_PIP_LIB_AS_ABOVE"
    }
}

image

Many thanks again!

@lawyinking
Copy link

Hi @dlqqq, I think this is everything you ask for:

{
    "model_provider_id": "cohere:medium",
    "embeddings_provider_id": null,
    "send_with_shift_enter": false,
    "fields": {},
    "api_keys": {
        "COHERE_API_KEY": "KEY_THAT_WORKS_WITH_COHERE_PIP_LIB_AS_ABOVE"
    }
}

image

Many thanks again!

how to enable this language model section on Jupyter? Thanks!

@dlqqq
Copy link
Member

dlqqq commented Jan 17, 2024

Hey folks, I dug into this issue. I believe this is because Cohere has renamed their models in their API. Previously, the only supported models were medium and xlarge. We need to update the list of model IDs for the Cohere providers.

Here's the current list of models supported by their Generate API (the one we use, I believe): https://docs.cohere.com/reference/generate

@dlqqq dlqqq changed the title CohereAPIError: model not found, make sure the correct model ID was used and that you have access to the model. Update Cohere model IDs Jan 17, 2024
@3coins
Copy link
Collaborator

3coins commented Jan 17, 2024

@dlqqq
Thanks for looking into this. There is also a chat model now available for Cohere, that we should add.
https://python.langchain.com/docs/integrations/chat/cohere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants