fIx: smaller nits
This commit is contained in:
63
backend/src/models/index.ts
Normal file
63
backend/src/models/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Models: Data structures and validation schemas.
|
||||
*
|
||||
* This module defines the domain models used throughout the application.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Agent request payload
|
||||
*/
|
||||
export type AgentRequest = {
|
||||
prompt: string
|
||||
context?: string
|
||||
contextNodes?: AgentContextNode[]
|
||||
connection?: AgentConnection
|
||||
reasoning?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Context node for agent requests
|
||||
*/
|
||||
export type AgentContextNode = {
|
||||
id: string
|
||||
content?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* AI connection configuration
|
||||
*/
|
||||
export type AgentConnection = {
|
||||
provider: 'openai' | 'local'
|
||||
baseURL?: string
|
||||
apiKey?: string
|
||||
model?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Agent response
|
||||
*/
|
||||
export type AgentResponse = {
|
||||
markdown: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Agent stream response
|
||||
*/
|
||||
export type AgentStreamResponse = {
|
||||
markdown: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Health check response
|
||||
*/
|
||||
export type HealthResponse = {
|
||||
ok: boolean
|
||||
timestamp: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Error response
|
||||
*/
|
||||
export type ErrorResponse = {
|
||||
error: string
|
||||
}
|
||||
Reference in New Issue
Block a user