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
No related branches found
No related tags found
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: # Required
configuration: docs/conf.py version: 2
# Set the OS, Python version and other tools you might need
build: build:
image: testing os: ubuntu-22.04
tools:
python: "3.11"
# NOTE: only build default HTML # Build documentation in the "docs/" directory with Sphinx
# formats: all sphinx:
configuration: docs/conf.py
python: python:
version: 3.9 install:
install: - requirements: docs/requirements.txt
- requirements: docs/requirements.txt
- method: pip
path: .
\ No newline at end of file
from typing import Any, Callable, Dict, Optional, Sequence 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 from llama_index.callbacks import CallbackManager
...@@ -86,7 +90,7 @@ class MonsterLLM(CustomLLM): ...@@ -86,7 +90,7 @@ class MonsterLLM(CustomLLM):
llm_models_enabled = [i for i, j in MODEL_TYPES.items() if j == "LLM"] 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 @property
def metadata(self) -> LLMMetadata: 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