Skip to content
Snippets Groups Projects
Unverified Commit 3fc6b0e0 authored by Vikasqblocks's avatar Vikasqblocks Committed by GitHub
Browse files

Bugfix MonsterAPI Pydantic version v2/v1 support. Doc Update (#7432)

parent 8e33935a
Branches
Tags
No related merge requests found
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
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment