diff --git a/coml/configagent/experience.py b/coml/configagent/experience.py index 2b45acb..d3e7e61 100644 --- a/coml/configagent/experience.py +++ b/coml/configagent/experience.py @@ -8,6 +8,7 @@ import orjson import pandas as pd from langchain.cache import InMemoryCache +from langchain.globals import set_llm_cache from peewee import ModelSelect, fn from .constants import * @@ -17,7 +18,7 @@ SAVE_OPTIONS = orjson.OPT_SERIALIZE_NUMPY | orjson.OPT_SERIALIZE_DATACLASS -langchain.llm_cache = InMemoryCache() +set_llm_cache(InMemoryCache()) def ingest_experience( diff --git a/coml/configagent/utils.py b/coml/configagent/utils.py index 5df25b0..32e115a 100644 --- a/coml/configagent/utils.py +++ b/coml/configagent/utils.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, Tuple, Union from langchain.embeddings import OpenAIEmbeddings -from langchain.llms import OpenAI +from langchain_openai import OpenAI from .constants import * diff --git a/coml/magics.py b/coml/magics.py index 0f163c5..38ee77d 100644 --- a/coml/magics.py +++ b/coml/magics.py @@ -14,7 +14,7 @@ no_var_expand, ) from IPython.display import HTML, Code, clear_output, display -from langchain.chat_models import ChatOpenAI +from langchain_openai import ChatOpenAI from .core import CoMLAgent from .ipython_utils import ( diff --git a/package.json b/package.json index 6c1fdf9..bc0bc19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coml", - "version": "0.0.7", + "version": "0.0.8", "description": "JupyterLab extension for CoML.", "keywords": [ "jupyter", diff --git a/pyproject.toml b/pyproject.toml index 2614f17..725b2a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,11 +4,13 @@ build-backend = "hatchling.build" [project] name = "mlcopilot" -version = "0.0.7" +version = "0.0.8" dependencies = [ "click", "colorama", "langchain", + "langchain-community", + "langchain-openai", "numpy", "orjson", "pandas",