cyber_query_ai.models

Data classes for the CyberQueryAI application.

Classes

ChatMessageModel(**data)

Chat message model for conversation history.

CyberQueryAIConfig(**data)

Configuration settings for the CyberQueryAI application.

CyberQueryAIModelConfig(**data)

Model configuration for the CyberQueryAI application.

ExploitModel(**data)

Exploit model for cybersecurity exploits.

GetApiConfigResponse(**data)

Response model for API config endpoint.

PostChatRequest(**data)

Request model for chat endpoint.

PostChatResponse(**data)

Response model for chat endpoint.

PostCodeExplanationResponse(**data)

Response model for code explanation endpoint.

PostCodeGenerationResponse(**data)

Response model for code generation.

PostExploitSearchResponse(**data)

Response model for exploit search endpoint.

PostPromptRequest(**data)

Request model with prompt.

RoleType(*values)

Role types for chat messages.

class cyber_query_ai.models.CyberQueryAIModelConfig(**data)[source]

Model configuration for the CyberQueryAI application.

model: str
embedding_model: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cyber_query_ai.models.CyberQueryAIConfig(**data)[source]

Configuration settings for the CyberQueryAI application.

model: CyberQueryAIModelConfig
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cyber_query_ai.models.RoleType(*values)[source]

Role types for chat messages.

USER = 'user'
ASSISTANT = 'assistant'
class cyber_query_ai.models.ChatMessageModel(**data)[source]

Chat message model for conversation history.

role: RoleType
content: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cyber_query_ai.models.PostChatRequest(**data)[source]

Request model for chat endpoint.

message: str
history: list[ChatMessageModel]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cyber_query_ai.models.PostPromptRequest(**data)[source]

Request model with prompt.

prompt: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cyber_query_ai.models.GetApiConfigResponse(**data)[source]

Response model for API config endpoint.

model: CyberQueryAIModelConfig
version: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cyber_query_ai.models.PostChatResponse(**data)[source]

Response model for chat endpoint.

model_message: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cyber_query_ai.models.PostCodeGenerationResponse(**data)[source]

Response model for code generation.

generated_code: str
explanation: str
language: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cyber_query_ai.models.PostCodeExplanationResponse(**data)[source]

Response model for code explanation endpoint.

explanation: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cyber_query_ai.models.ExploitModel(**data)[source]

Exploit model for cybersecurity exploits.

title: str
severity: str
description: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cyber_query_ai.models.PostExploitSearchResponse(**data)[source]

Response model for exploit search endpoint.

exploits: list[ExploitModel]
explanation: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].