Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Llama Index
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
run-llama
Llama Index
Commits
3fc6b0e0
Unverified
Commit
3fc6b0e0
authored
1 year ago
by
Vikasqblocks
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix MonsterAPI Pydantic version v2/v1 support. Doc Update (#7432)
parent
8e33935a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.readthedocs.yaml
+13
-11
13 additions, 11 deletions
.readthedocs.yaml
llama_index/llms/monsterapi.py
+6
-2
6 additions, 2 deletions
llama_index/llms/monsterapi.py
with
19 additions
and
13 deletions
.readthedocs.yaml
+
13
−
11
View file @
3fc6b0e0
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
This diff is collapsed.
Click to expand it.
llama_index/llms/monsterapi.py
+
6
−
2
View file @
3fc6b0e0
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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment