curategpt.app package
Submodules
curategpt.app.app module
Streamlit app for CurateGPT.
- curategpt.app.app.ask_chatbot(query, expand=False)
- Return type:
- curategpt.app.app.filtered_collection_names()
- Return type:
List
[str
]
- curategpt.app.app.get_chat_agent()
- Return type:
Union
[ChatAgent
,BaseWrapper
]
- curategpt.app.app.html_table(rows)
- Return type:
str
curategpt.app.cart module
- class curategpt.app.cart.Cart(**data)
Bases:
BaseModel
A cart is a list of items that can be added to or removed from
- add(item)
- model_config: ClassVar[ConfigDict] = {'protected_namespaces': ()}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- remove(item)
- property size
- class curategpt.app.cart.CartItem(**data)
Bases:
BaseModel
A cart item is a single item in a cart
-
metadata:
Optional
[Dict
]
- model_config: ClassVar[ConfigDict] = {'protected_namespaces': ()}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
object:
Union
[Dict
,BaseModel
]
-
object_type:
Optional
[str
]
-
source:
Optional
[str
]
-
metadata:
curategpt.app.components module
- class curategpt.app.components.DimensionalityReductionOptions(value)
Bases:
str
,Enum
An enumeration.
- PCA = 'PCA'
- TSNE = 't-SNE'
- UMAP = 'UMAP'
- curategpt.app.components.limit_slider_component(name='Max examples', tooltip='\nExamples that are similar to your query are picked from the selected\nknowledge base, and used as context to guide the LLM.\nIf you pick too many examples, it may go beyond the limits of the context window\nfor the model you selected.\n')
- curategpt.app.components.vectors_to_fig(labels, vectors, method=None)
curategpt.app.helper module
Utilities for streamlit app.
- curategpt.app.helper.get_applicable_examples(collection, mode, relax=True)
Get applicable examples for a given collection and mode.
- Parameters:
collection (
Optional
[str
])mode (
str
)
- Return type:
List
[Dict
]- Returns:
- curategpt.app.helper.get_case_collection()
curategpt.app.state module
- class curategpt.app.state.ApplicationState(page=None, db=<factory>, extractor=<factory>, cart=<factory>, page_states=<factory>)
Bases:
object
-
page:
Optional
[str
] = None
-
page:
- class curategpt.app.state.PageState(predicted_object=None, chat_response=None, results=None, selected=None)
Bases:
object
-
chat_response:
ChatResponse
= None
-
predicted_object:
AnnotatedObject
= None
-
results:
List
= None
-
selected:
Any
= None
-
chat_response:
- curategpt.app.state.get_state(st)
Gets the application state from the streamlit session state
- Parameters:
st
- Return type:
- Returns: