diff --git a/.readthedocs.yaml b/.readthedocs.yaml
index fef23130fe6d6b0afb0a3d4f8c97d730f2048639..7fded15a413ad0697eda3ebd9778fe3e3c9346b2 100644
--- a/.readthedocs.yaml
+++ b/.readthedocs.yaml
@@ -1,17 +1,19 @@
-version: 2
+# Read the Docs configuration file for Sphinx projects
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
 
-sphinx:
-  configuration: docs/conf.py
+# Required
+version: 2
 
+# Set the OS, Python version and other tools you might need
 build:
-  image: testing
+  os: ubuntu-22.04
+  tools:
+    python: "3.11"
 
-# NOTE: only build default HTML
-# formats: all
+# Build documentation in the "docs/" directory with Sphinx
+sphinx:
+  configuration: docs/conf.py
 
 python:
-  version: 3.9
-  install:
-    - requirements: docs/requirements.txt
-    - method: pip
-      path: .
\ No newline at end of file
+   install:
+   - requirements: docs/requirements.txt
diff --git a/llama_index/llms/monsterapi.py b/llama_index/llms/monsterapi.py
index 1062eb823d12b78808a9b208bffb4da0a4f17f29..8e513bad23ef63eb08a22217d90ae9967ca085ae 100644
--- a/llama_index/llms/monsterapi.py
+++ b/llama_index/llms/monsterapi.py
@@ -1,5 +1,9 @@
 from typing import Any, Callable, Dict, Optional, Sequence
-from pydantic import Field, PrivateAttr
+
+try:
+    from pydantic.v1 import Field, PrivateAttr
+except ImportError:
+    from pydantic import Field, PrivateAttr
 
 
 from llama_index.callbacks import CallbackManager
@@ -86,7 +90,7 @@ class MonsterLLM(CustomLLM):
 
         llm_models_enabled = [i for i, j in MODEL_TYPES.items() if j == "LLM"]
 
-        return MonsterClient(str(monster_api_key)), llm_models_enabled
+        return MonsterClient(monster_api_key), llm_models_enabled
 
     @property
     def metadata(self) -> LLMMetadata: