Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/cli-go/internal/cmd/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ func doIngest(content, sourceType string) error {
return err
}
body := map[string]string{
"content": content,
"text": content,
"source_type": sourceType,
}
data, err := c.Post("/ingest", body)
data, err := c.Post("/ingest/text", body)
if err != nil {
return err
}
Expand Down
4 changes: 3 additions & 1 deletion packages/core/alayaos_core/schemas/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import uuid
from datetime import datetime

from pydantic import BaseModel, field_validator
from pydantic import BaseModel, ConfigDict, field_validator


class TreeNodeResponse(BaseModel):
model_config = ConfigDict(from_attributes=True)

id: uuid.UUID
path: str
node_type: str
Expand Down
3 changes: 3 additions & 0 deletions packages/core/alayaos_core/services/ask.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,11 @@ async def ask(
max_tokens=settings.ASK_MAX_OUTPUT_TOKENS,
)

# Collect valid IDs from all evidence (including chunk-sourced with entity_id/claim_id)
valid_entity_ids = {u.source_id for u in evidence if u.source_type == "entity"}
valid_entity_ids |= {u.entity_id for u in evidence if u.entity_id is not None}
valid_claim_ids = {u.source_id for u in evidence if u.source_type == "claim"}
valid_claim_ids |= {u.claim_id for u in evidence if u.claim_id is not None}
validated_citations = []
for c in response.citations:
if c.entity_id and c.entity_id not in valid_entity_ids:
Expand Down
Loading