aef8791151
- Added Appshell component with responsive navbar and main content area - Integrated ColorSchemeToggle for light/dark mode switching - Created Welcome component with styled title and introductory text - Developed ChatPage for LLM interaction with WebSocket support - Implemented Biblioteca for managing notes with rich text editor - Added LoginPage for user authentication with error handling - Introduced MessageList and MessageBubble components for chat messages - Styled components with CSS modules for consistent design
20 lines
803 B
Python
20 lines
803 B
Python
from domains.Security.GenerarIDs import GeneradorIDUnico
|
|
|
|
class OllamaCredencial:
|
|
def __init__(self, titulo: str, base_url: str = "http://localhost:11434", id: str = None):
|
|
"""
|
|
:param titulo: Nombre descriptivo para esta credencial de Ollama.
|
|
:param base_url: URL base donde está corriendo el servidor de Ollama (por defecto: localhost).
|
|
"""
|
|
self.id = id if id is not None else GeneradorIDUnico("OLLA").generar()
|
|
self.titulo = titulo
|
|
self.base_url = base_url.rstrip("/")
|
|
|
|
def get_headers(self) -> dict:
|
|
"""
|
|
Retorna encabezados para autenticación si se requiere en el futuro.
|
|
Por defecto, Ollama local no usa headers especiales.
|
|
"""
|
|
return {
|
|
"Content-Type": "application/json"
|
|
} |