Skip to content

Assistant message timestamp vs human timestamp has inconsistent formatting #452

@mpivchev

Description

@mpivchev

Which version of assistant are you using?

latest

Which version of Nextcloud are you using?

latest

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

No response

Describe the Bug

Upon calling chat/messages?sessionId= we get a ms timestamp for human messages and s timestamp for assistant messages.
This may also be an issue with check_generation

[
  {
    "id": 2158,
    "session_id": 462,
    "role": "human",
    "content": "Hi how are you",
    "timestamp": 1769775829389,
    "ocp_task_id": 0,
    "sources": "[]",
    "attachments": []
  },
  {
    "id": 2159,
    "session_id": 462,
    "role": "assistant",
    "content": "Hallo! Ik ben goed, dank je wel. Hoe kan ik je vandaag helpen?",
    "timestamp": 1769775849,
    "ocp_task_id": 7336,
    "sources": "[]",
    "attachments": []
  },
  {
    "id": 2160,
    "session_id": 462,
    "role": "human",
    "content": "What time is it",
    "timestamp": 1769775904693,
    "ocp_task_id": 0,
    "sources": "[]",
    "attachments": []
  },
  {
    "id": 2436,
    "session_id": 462,
    "role": "human",
    "content": "w",
    "timestamp": 1770394313,
    "ocp_task_id": 0,
    "sources": "[]",
    "attachments": []
  }
]

Expected Behavior

This should be consistent

To Reproduce

Try API calls

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions