Merging PR_218 openai_rev package with new streamlit chat app

This commit is contained in:
noptuno
2023-04-27 20:29:30 -04:00
parent 479b8d6d10
commit 355dee533b
8378 changed files with 2931636 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
settings = None
class Settings:
"""Global settings for pydeck
Parameters
----------
custom_libraries : list
List of dictionaries of the format {'libraryName': 'LibraryName', 'resouceUri': 'deck.gl class URL'}.
For example, if there was a custom deck.gl Layer classed `TagmapLayer`
bundled for distribution at the path `https://demourl.libpath/bundle.js`,
one could load it into pydeck by doing the following:
```
pydeck.settings.custom_libraries = [
{
'libraryName': 'tagmapLibrary',
'resourceUri': 'https://demourl.libpath/bundle.js'
}
]
layer = pydeck.Layer(
'TagmapLayer', # Assumes that tagmapLibrary exports TagmapLayer
# <... kwargs here ...>
)
```
configuration : str
default_layer_attributes : dict
"""
def __init__(self, custom_libraries: list = None, configuration: str = None, default_layer_attributes: dict = None):
assert not settings, "Cannot instantiate more than one Settings object"
self.custom_libraries = custom_libraries or []
self.configuration = configuration
self.default_layer_attributes = default_layer_attributes
def register_library(self, name, uri):
self.custom_libraries.append({"libraryName": name, "uri": uri})
if not settings:
settings = Settings()