language models and set defaults are updated
This commit is contained in:
@@ -34,6 +34,7 @@ class Event:
|
||||
RESPONSE_VALIDATOR: Optional[Any]
|
||||
REQUEST_VALIDATOR: Optional[Any]
|
||||
DESCRIPTION: str
|
||||
LANGUAGE_MODELS: list
|
||||
EXTRA_OPTIONS: Optional[Dict[str, Any]] = None
|
||||
endpoint_callable: Any
|
||||
|
||||
@@ -42,6 +43,7 @@ class Event:
|
||||
name: str,
|
||||
key: str | UUID,
|
||||
description: str,
|
||||
language_models: list[Dict[str, Dict]],
|
||||
request_validator: Optional[Any] = None,
|
||||
response_validator: Optional[Any] = None,
|
||||
extra_options: Optional[Dict[str, Any]] = None,
|
||||
@@ -50,9 +52,18 @@ class Event:
|
||||
self.KEY_ = key
|
||||
self.REQUEST_VALIDATOR = request_validator
|
||||
self.RESPONSE_VALIDATOR = response_validator
|
||||
self.LANGUAGE_MODELS = language_models
|
||||
self.DESCRIPTION = description
|
||||
self.EXTRA_OPTIONS = extra_options
|
||||
|
||||
@property
|
||||
def request_headers(self):
|
||||
return self.LANGUAGE_MODELS
|
||||
|
||||
@property
|
||||
def response_headers(self):
|
||||
return self.LANGUAGE_MODELS
|
||||
|
||||
@property
|
||||
def description(self):
|
||||
return f"This is an event of {self.name}. Description: {self.DESCRIPTION}"
|
||||
|
||||
@@ -4,6 +4,7 @@ from ApiLayers.ApiServices.Cluster.create_router import (
|
||||
CreateRouterFromCluster,
|
||||
CreateEndpointFromCluster,
|
||||
)
|
||||
from ApiLayers.AllConfigs.Redis.configs import RedisCategoryKeys
|
||||
from Events.Engine.abstract_class import CategoryCluster
|
||||
from Services.Redis.Actions.actions import RedisActions
|
||||
from Services.Redis.Models.cluster import RedisList
|
||||
@@ -123,7 +124,6 @@ class SetItems2Redis:
|
||||
return f"\nSetItems2Redis:\n\n{self.std_out}"
|
||||
|
||||
def set_items(self):
|
||||
from ApiLayers.AllConfigs.Redis.configs import RedisCategoryKeys
|
||||
|
||||
dict_prep = self.prepare_events.valid_redis_items.as_dict
|
||||
for (
|
||||
|
||||
Reference in New Issue
Block a user