Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] No metadata for session #275

Closed
netandreus opened this issue Nov 13, 2023 · 1 comment
Closed

[BUG] No metadata for session #275

netandreus opened this issue Nov 13, 2023 · 1 comment

Comments

@netandreus
Copy link

Describe the bug
I am trying to use zep with LocalAI. Thanks for resolve issue-270. Now there are now errors, but metadata still empty.

To Reproduce
Here is my chat:
Screenshot 2023-11-13 at 11 44 14

And session in Zep:
Screenshot 2023-11-13 at 11 44 50

What should I do for enable metadata and Zep as short-term memmory?

Expected behavior
Metadata for messages.

Logs

zep  | time="2023-11-13T07:43:34Z" level=debug msg="Handling task: d0b799af-0023-4f16-b799-d225c469e417"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="SummaryTask called for session cddeddfc-5863-4ef1-8449-bd10acd1f8d6"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="SELECT[4.498959ms]: SELECT \"su\".\"uuid\", \"su\".\"created_at\", \"su\".\"updated_at\", \"su\".\"deleted_at\", \"su\".\"session_id\", \"su\".\"content\", \"su\".\"metadata\", \"su\".\"token_count\", \"su\".\"summary_point_uuid\" FROM \"summary\" AS \"su\" WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') AND (deleted_at IS NULL) AND \"su\".\"deleted_at\" IS NULL ORDER BY \"created_at\" DESC LIMIT 1"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="SELECT[2.557334ms]: SELECT \"m\".\"uuid\", \"m\".\"id\", \"m\".\"created_at\", \"m\".\"updated_at\", \"m\".\"deleted_at\", \"m\".\"session_id\", \"m\".\"role\", \"m\".\"content\", \"m\".\"token_count\", \"m\".\"metadata\" FROM \"message\" AS \"m\" WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') AND \"m\".\"deleted_at\" IS NULL ORDER BY \"id\" ASC LIMIT 12"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="Got messages for cddeddfc-5863-4ef1-8449-bd10acd1f8d6: 4"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="Handled task: d0b799af-0023-4f16-b799-d225c469e417"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="Message acked by subscriber" consumer_group= msg_uuid=d0b799af-0023-4f16-b799-d225c469e417 subscriber_id=01HF3STCBVQ7DB6KAVWDCK1Q70 topic=message_summarizer
zep  | time="2023-11-13T07:43:34Z" level=debug msg="Handling task: 107813fb-83d3-4a5a-91b4-8625c22e9886"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="MessageTokenCountTask called for session cddeddfc-5863-4ef1-8449-bd10acd1f8d6"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="SELECT[2.317542ms]: SELECT \"m\".\"uuid\", \"m\".\"id\", \"m\".\"created_at\", \"m\".\"updated_at\", \"m\".\"deleted_at\", \"m\".\"session_id\", \"m\".\"role\", \"m\".\"content\", \"m\".\"token_count\", \"m\".\"metadata\" FROM \"message\" AS \"m\" WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') AND (uuid IN ('74ade5a1-4fb4-4ada-9cb9-a6b5df067249', '239d246f-1569-4fad-be6a-7a67168590fe')) AND \"m\".\"deleted_at\" IS NULL"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="putMessages called for session cddeddfc-5863-4ef1-8449-bd10acd1f8d6 with 2 messages"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="UPDATE[3.949916ms]: UPDATE \"session\" AS \"s\" SET \"deleted_at\" = NULL, \"updated_at\" = '2023-11-13 07:43:34.900671+00:00' WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') RETURNING *"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="INSERT[2.139875ms]: INSERT INTO \"message\" AS \"m\" (\"uuid\", \"session_id\", \"role\", \"content\", \"token_count\", \"updated_at\") VALUES ('74ade5a1-4fb4-4ada-9cb9-a6b5df067249', 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6', 'human', 'My name is Andrey.', 8, DEFAULT), ('239d246f-1569-4fad-be6a-7a67168590fe', 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6', 'ai', ' Andrey.', 6, DEFAULT) ON CONFLICT (uuid) DO UPDATE SET \"session_id\" = EXCLUDED.\"session_id\", \"role\" = EXCLUDED.\"role\", \"content\" = EXCLUDED.\"content\", \"token_count\" = EXCLUDED.\"token_count\", \"updated_at\" = EXCLUDED.\"updated_at\" RETURNING \"updated_at\""
zep  | time="2023-11-13T07:43:34Z" level=debug msg="BEGIN[1.852916ms]: BEGIN"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="COMMIT[2.08475ms]: COMMIT"
zep  | time="2023-11-13T07:43:34Z" level=error msg="ROLLBACK[1.083µs]: ROLLBACK: sql: transaction has already been committed or rolled back"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="putMessages completed for session cddeddfc-5863-4ef1-8449-bd10acd1f8d6 with 2 messages"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="Handled task: 107813fb-83d3-4a5a-91b4-8625c22e9886"
zep  | time="2023-11-13T07:43:34Z" level=debug msg="Message acked by subscriber" consumer_group= msg_uuid=107813fb-83d3-4a5a-91b4-8625c22e9886 subscriber_id=01HF3STCBVV3H2VC5XGSSC7B79 topic=message_token_count
zep  | time="2023-11-13T07:43:38Z" level=debug msg="SELECT[1.489708ms]: SELECT \"su\".\"uuid\", \"su\".\"created_at\", \"su\".\"updated_at\", \"su\".\"deleted_at\", \"su\".\"session_id\", \"su\".\"content\", \"su\".\"metadata\", \"su\".\"token_count\", \"su\".\"summary_point_uuid\" FROM \"summary\" AS \"su\" WHERE (session_id = 'a169f6ae-2ed4-4406-b7b1-77286a97c349') AND (deleted_at IS NULL) AND \"su\".\"deleted_at\" IS NULL ORDER BY \"created_at\" DESC LIMIT 1"
zep  | time="2023-11-13T07:43:38Z" level=debug msg="SELECT[2.834666ms]: SELECT \"m\".\"uuid\", \"m\".\"id\", \"m\".\"created_at\", \"m\".\"updated_at\", \"m\".\"deleted_at\", \"m\".\"session_id\", \"m\".\"role\", \"m\".\"content\", \"m\".\"token_count\", \"m\".\"metadata\" FROM \"message\" AS \"m\" WHERE (session_id = 'a169f6ae-2ed4-4406-b7b1-77286a97c349') AND \"m\".\"deleted_at\" IS NULL ORDER BY \"id\" ASC LIMIT 12"
zep  | time="2023-11-13T07:43:38Z" level=info msg="http://host.docker.internal:8002/api/v1/sessions/a169f6ae-2ed4-4406-b7b1-77286a97c349/memory" bytes=10 category=router duration=4628625 duration_display=4.629084ms method=GET proto=HTTP/1.1 remote_ip=192.168.65.1 status_code=404
zep  | time="2023-11-13T07:43:39Z" level=debug msg="putMessages called for session cddeddfc-5863-4ef1-8449-bd10acd1f8d6 with 2 messages"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="UPDATE[2.297542ms]: UPDATE \"session\" AS \"s\" SET \"deleted_at\" = NULL, \"updated_at\" = '2023-11-13 07:43:39.489839+00:00' WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') RETURNING *"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="INSERT[1.9275ms]: INSERT INTO \"message\" AS \"m\" (\"uuid\", \"session_id\", \"role\", \"content\", \"token_count\", \"updated_at\") VALUES (DEFAULT, 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6', 'human', 'What is my name?', 0, DEFAULT), (DEFAULT, 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6', 'ai', ' The name of the chatbot is \"HelpBot\".', 0, DEFAULT) ON CONFLICT (uuid) DO UPDATE SET \"session_id\" = EXCLUDED.\"session_id\", \"role\" = EXCLUDED.\"role\", \"content\" = EXCLUDED.\"content\", \"token_count\" = EXCLUDED.\"token_count\", \"updated_at\" = EXCLUDED.\"updated_at\" RETURNING \"uuid\", \"updated_at\""
zep  | time="2023-11-13T07:43:39Z" level=debug msg="BEGIN[1.017792ms]: BEGIN"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="COMMIT[690.417µs]: COMMIT"
zep  | time="2023-11-13T07:43:39Z" level=error msg="ROLLBACK[1.417µs]: ROLLBACK: sql: transaction has already been committed or rolled back"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="putMessages completed for session cddeddfc-5863-4ef1-8449-bd10acd1f8d6 with 2 messages"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Publishing task: message_summarizer"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Publishing message: [{\"uuid\":\"0469ca9b-93c4-4804-bf19-fed6b9e1f3c1\"},{\"uuid\":\"b5806f34-ae2f-457f-ae53-47b326f1a483\"}]"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Published task: message_summarizer"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Publishing task: message_embedder"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Publishing message: [{\"uuid\":\"0469ca9b-93c4-4804-bf19-fed6b9e1f3c1\"},{\"uuid\":\"b5806f34-ae2f-457f-ae53-47b326f1a483\"}]"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Published task: message_embedder"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Publishing task: message_ner"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Publishing message: [{\"uuid\":\"0469ca9b-93c4-4804-bf19-fed6b9e1f3c1\"},{\"uuid\":\"b5806f34-ae2f-457f-ae53-47b326f1a483\"}]"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Published task: message_ner"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Publishing task: message_intent"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Publishing message: [{\"uuid\":\"0469ca9b-93c4-4804-bf19-fed6b9e1f3c1\"},{\"uuid\":\"b5806f34-ae2f-457f-ae53-47b326f1a483\"}]"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Published task: message_intent"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Publishing task: message_token_count"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Publishing message: [{\"uuid\":\"0469ca9b-93c4-4804-bf19-fed6b9e1f3c1\"},{\"uuid\":\"b5806f34-ae2f-457f-ae53-47b326f1a483\"}]"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Published task: message_token_count"
zep  | time="2023-11-13T07:43:39Z" level=info msg="http://host.docker.internal:8002/api/v1/sessions/cddeddfc-5863-4ef1-8449-bd10acd1f8d6/memory" bytes=2 category=router duration=20797375 duration_display=20.797708ms method=POST proto=HTTP/1.1 remote_ip=192.168.65.1 status_code=200
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Handling task: 4ef0479c-4eb3-4077-8368-34808f32e4b5"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="SummaryTask called for session cddeddfc-5863-4ef1-8449-bd10acd1f8d6"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="SELECT[2.26425ms]: SELECT \"su\".\"uuid\", \"su\".\"created_at\", \"su\".\"updated_at\", \"su\".\"deleted_at\", \"su\".\"session_id\", \"su\".\"content\", \"su\".\"metadata\", \"su\".\"token_count\", \"su\".\"summary_point_uuid\" FROM \"summary\" AS \"su\" WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') AND (deleted_at IS NULL) AND \"su\".\"deleted_at\" IS NULL ORDER BY \"created_at\" DESC LIMIT 1"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="SELECT[3.49525ms]: SELECT \"m\".\"uuid\", \"m\".\"id\", \"m\".\"created_at\", \"m\".\"updated_at\", \"m\".\"deleted_at\", \"m\".\"session_id\", \"m\".\"role\", \"m\".\"content\", \"m\".\"token_count\", \"m\".\"metadata\" FROM \"message\" AS \"m\" WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') AND \"m\".\"deleted_at\" IS NULL ORDER BY \"id\" ASC LIMIT 12"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Got messages for cddeddfc-5863-4ef1-8449-bd10acd1f8d6: 6"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Handled task: 4ef0479c-4eb3-4077-8368-34808f32e4b5"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Message acked by subscriber" consumer_group= msg_uuid=4ef0479c-4eb3-4077-8368-34808f32e4b5 subscriber_id=01HF3STCBVQ7DB6KAVWDCK1Q70 topic=message_summarizer
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Handling task: f07011f5-b7b0-4afa-8b57-51d31a5cecf6"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="MessageTokenCountTask called for session cddeddfc-5863-4ef1-8449-bd10acd1f8d6"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="SELECT[2.136875ms]: SELECT \"m\".\"uuid\", \"m\".\"id\", \"m\".\"created_at\", \"m\".\"updated_at\", \"m\".\"deleted_at\", \"m\".\"session_id\", \"m\".\"role\", \"m\".\"content\", \"m\".\"token_count\", \"m\".\"metadata\" FROM \"message\" AS \"m\" WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') AND (uuid IN ('0469ca9b-93c4-4804-bf19-fed6b9e1f3c1', 'b5806f34-ae2f-457f-ae53-47b326f1a483')) AND \"m\".\"deleted_at\" IS NULL"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="putMessages called for session cddeddfc-5863-4ef1-8449-bd10acd1f8d6 with 2 messages"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="UPDATE[3.399459ms]: UPDATE \"session\" AS \"s\" SET \"deleted_at\" = NULL, \"updated_at\" = '2023-11-13 07:43:39.934646+00:00' WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') RETURNING *"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="INSERT[2.286333ms]: INSERT INTO \"message\" AS \"m\" (\"uuid\", \"session_id\", \"role\", \"content\", \"token_count\", \"updated_at\") VALUES ('0469ca9b-93c4-4804-bf19-fed6b9e1f3c1', 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6', 'human', 'What is my name?', 7, DEFAULT), ('b5806f34-ae2f-457f-ae53-47b326f1a483', 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6', 'ai', ' The name of the chatbot is \"HelpBot\".', 14, DEFAULT) ON CONFLICT (uuid) DO UPDATE SET \"session_id\" = EXCLUDED.\"session_id\", \"role\" = EXCLUDED.\"role\", \"content\" = EXCLUDED.\"content\", \"token_count\" = EXCLUDED.\"token_count\", \"updated_at\" = EXCLUDED.\"updated_at\" RETURNING \"updated_at\""
zep  | time="2023-11-13T07:43:39Z" level=debug msg="BEGIN[1.249416ms]: BEGIN"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="COMMIT[1.304375ms]: COMMIT"
zep  | time="2023-11-13T07:43:39Z" level=error msg="ROLLBACK[1.583µs]: ROLLBACK: sql: transaction has already been committed or rolled back"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="putMessages completed for session cddeddfc-5863-4ef1-8449-bd10acd1f8d6 with 2 messages"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Handled task: f07011f5-b7b0-4afa-8b57-51d31a5cecf6"
zep  | time="2023-11-13T07:43:39Z" level=debug msg="Message acked by subscriber" consumer_group= msg_uuid=f07011f5-b7b0-4afa-8b57-51d31a5cecf6 subscriber_id=01HF3STCBVV3H2VC5XGSSC7B79 topic=message_token_count
zep  | time="2023-11-13T07:44:19Z" level=debug msg="SELECT[1.382625ms]: SELECT count(*) FROM \"session\" AS \"s\" WHERE \"s\".\"deleted_at\" IS NULL"
zep  | time="2023-11-13T07:44:19Z" level=debug msg="SELECT[1.312834ms]: SELECT \"s\".\"uuid\", \"s\".\"id\", \"s\".\"session_id\", \"s\".\"created_at\", \"s\".\"updated_at\", \"s\".\"deleted_at\", \"s\".\"metadata\", \"s\".\"user_id\" FROM \"session\" AS \"s\" WHERE \"s\".\"deleted_at\" IS NULL ORDER BY \"created_at\" DESC LIMIT 10"
zep  | time="2023-11-13T07:44:19Z" level=info msg="http://localhost:8002/admin/sessions" bytes=7612 category=router duration=4715583 duration_display=4.715875ms method=GET proto=HTTP/1.1 remote_ip=192.168.65.1 status_code=200
zep  | time="2023-11-13T07:44:20Z" level=debug msg="SELECT[1.197875ms]: SELECT count(*) FROM \"message\" AS \"m\" WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') AND \"m\".\"deleted_at\" IS NULL"
zep  | time="2023-11-13T07:44:20Z" level=debug msg="SELECT[1.482ms]: SELECT \"m\".\"uuid\", \"m\".\"id\", \"m\".\"created_at\", \"m\".\"updated_at\", \"m\".\"deleted_at\", \"m\".\"session_id\", \"m\".\"role\", \"m\".\"content\", \"m\".\"token_count\", \"m\".\"metadata\" FROM \"message\" AS \"m\" WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') AND \"m\".\"deleted_at\" IS NULL ORDER BY id ASC LIMIT 10"
zep  | time="2023-11-13T07:44:20Z" level=debug msg="SELECT[1.35325ms]: SELECT \"su\".\"uuid\", \"su\".\"created_at\", \"su\".\"updated_at\", \"su\".\"deleted_at\", \"su\".\"session_id\", \"su\".\"content\", \"su\".\"metadata\", \"su\".\"token_count\", \"su\".\"summary_point_uuid\" FROM \"summary\" AS \"su\" WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') AND (deleted_at IS NULL) AND \"su\".\"deleted_at\" IS NULL ORDER BY \"created_at\" ASC LIMIT 9999"
zep  | time="2023-11-13T07:44:20Z" level=debug msg="SELECT[1.752625ms]: SELECT \"s\".\"uuid\", \"s\".\"id\", \"s\".\"session_id\", \"s\".\"created_at\", \"s\".\"updated_at\", \"s\".\"deleted_at\", \"s\".\"metadata\", \"s\".\"user_id\" FROM \"session\" AS \"s\" WHERE (session_id = 'cddeddfc-5863-4ef1-8449-bd10acd1f8d6') AND \"s\".\"deleted_at\" IS NULL"
zep  | time="2023-11-13T07:44:20Z" level=info msg="http://localhost:8002/admin/sessions/cddeddfc-5863-4ef1-8449-bd10acd1f8d6" bytes=12355 category=router duration=10451958 duration_display=10.452458ms method=GET proto=HTTP/1.1 remote_ip=192.168.65.1 status_code=200

Environment (please complete the following information):

  • Zep version: 0.17.3-88d7882 (2023-11-08T13:39:21+0000)
  • Zep SDK and version: not using
  • Deployment using docker compose

Note: The Zep server version is available in the Zep server logs at startup:
Starting zep server version 0.11.0-cbf4fe4 (2023-08-30T12:49:03+0000)

Additional context

config.yaml

llm:
  service: "openai"
  model: "text-embedding"
  openai_endpoint: "http://host.docker.internal:8080/v1"

nlp:
  server_url: "http://host.docker.internal:5557"

memory:
  message_window: 12

extractors:
  documents:
    embeddings:
      enabled: true
      chunk_size: 200
      dimensions: 1536
      service: "openai"
  messages:
    summarizer:
      enabled: true
      entities:
        enabled: true
      embeddings:
        enabled: true
        chunk_size: 200
        dimensions: 1536
        service: "openai"
    entities:
      enabled: true
    intent:
      enabled: true

store:
  type: "postgres"
  postgres:
    dsn: "postgres://postgres:postgres@localhost:5433/?sslmode=disable"

embeddings:
  enabled: true
  dimensions: 1536
  model: "openai"

server:
  host: 0.0.0.0
  port: 8000
  web_enabled: true
  max_request_size: 5242880

log:
  level: "debug"

docker-compose.yaml

version: '3.5'
services:
  #############
  #  LocalAI  #
  #############
  local_ai:
    container_name: llm_local_ai
    image: llm_local_ai
    environment:
      - LOCAL_AI_PORT=${LOCAL_AI_PORT}
    build:
      context: .
      dockerfile: ./build/local_ai/Dockerfile
      args:
        DOCKER_PLATFORM: ${DOCKER_PLATFORM}
        LOCAL_AI_VERSION: ${LOCAL_AI_VERSION}
        LOCAL_AI_BUILD_TYPE: ${LOCAL_AI_BUILD_TYPE}
        LOCAL_AI_PORT: ${LOCAL_AI_PORT}
    ports:
      - "${LOCAL_AI_PORT}:${LOCAL_AI_PORT}"
    restart: unless-stopped
    stdin_open: true
    tty: true
    volumes:
      - ${PWD}/models:/local-ai/models
    healthcheck:
      test: [ "CMD", "/usr/local/bin/healthcheck.sh" ]
      timeout: 10s
      retries: 10

  #############
  #  Zep nlp  #
  #############
  zep_nlp:
    image: zep_nlp
    container_name: zep_nlp
    build:
      dockerfile: ./build/zep_nlp/Dockerfile
    environment:
      ENABLE_EMBEDDINGS: true
    ports:
      - 5557:5557
    healthcheck:
      test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/5557' || exit 1
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 45s

  ###########################
  #  Postgres (for zep)     #
  ###########################
  zep_postgres:
    container_name: zep_postgres
    image: zep_postgres
    build:
      dockerfile: ./build/zep_postgres/Dockerfile
    ports:
      - 5434:5432
    volumes:
      - ./volumes/zep_postgres_data/data:/var/lib/postgresql/data
    shm_size: "128mb"  # Increase this if vacuuming fails with a "no space left on device" error
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
    healthcheck:
      test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "postgres" ]
      interval: 5s
      timeout: 5s
      retries: 5

  #########
  #  Zep  #
  #########
  zep:
    image: zep
    container_name: zep
    build:
      dockerfile: ./build/zep/Dockerfile
    depends_on:
      zep_postgres:
        condition: service_healthy
      zep_nlp:
        condition: service_healthy
    ports:
      - "8002:8000"
    volumes:
      - ./build/zep/config.yaml:/app/config.yaml
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      ZEP_STORE_TYPE: postgres
      ZEP_STORE_POSTGRES_DSN: ${ZEP_DATABASE_CONNECTION_STRING}
      ZEP_OPENAI_API_KEY: ${ZEP_OPENAI_API_KEY}
    healthcheck:
      test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/8000' || exit 1
      interval: 5s
      timeout: 10s
      retries: 3
      start_period: 40s
@netandreus
Copy link
Author

There were several issues:

  1. There is no section extractor.messages.embedding in my config.yaml
  2. I use embeddings model for chat complete llm request. It's wrong.
  3. I use incorrect dimensions. Correct for my case is 384, according to my localAI local model.
  4. Model name text-embedding-ada-002 is hardcoded somewhere in zep. I have created an issue-276.
  5. There is no ability to define promt for intent. I have created an issue-277.

Here is my correct config.yaml file:

llm:
  service: "openai"
  model: "gpt-3.5-turbo-1106"
  openai_endpoint: "http://host.docker.internal:8080/v1"

nlp:
  server_url: "http://host.docker.internal:5557"

memory:
  message_window: 12

extractors:
  documents:
    embeddings:
      enabled: true
      chunk_size: 200
      dimensions: 384
      service: "openai"
  messages:
    embeddings:
      enabled: true
      chunk_size: 200
      dimensions: 384
      service: "openai"
    summarizer:
      enabled: true
      entities:
        enabled: true
      embeddings:
        enabled: true
        chunk_size: 200
        dimensions: 384
        service: "openai"
    entities:
      enabled: true
    intent:
      enabled: true

store:
  type: "postgres"
  postgres:
    dsn: "postgres://postgres:postgres@localhost:5433/?sslmode=disable"

embeddings:
  enabled: true
  dimensions: 384
  model: "openai"

server:
  host: 0.0.0.0
  port: 8000
  web_enabled: true
  max_request_size: 5242880

auth:
  # Set to true to enable authentication
  required: false
  # Do not use this secret in production. The ZEP_AUTH_SECRET environment variable should be
  # set to a cryptographically secure secret. See the Zep docs for details.
  secret: "do-not-use-this-secret-in-production"
data:
  #  PurgeEvery is the period between hard deletes, in minutes.
  #  If set to 0 or undefined, hard deletes will not be performed.
  purge_every: 60

log:
  level: "debug"

opentelemetry:
  enabled: false
  endpoint:
  attributes: {}
# Custom Prompts Configuration
# Allows customization of extractor prompts.
custom_prompts:
  summarizer_prompts:
    # Anthropic Guidelines:
    # - Use XML-style tags like <current_summary> as element identifiers.
    # - Include {{.PrevSummary}} and {{.MessagesJoined}} as template variables.
    # - Clearly explain model instructions, e.g., "Review content inside <current_summary></current_summary> tags".
    # - Provide a clear example within the prompt.
    #
    # Example format:
    # anthropic: |
    #   <YOUR INSTRUCTIONS HERE>
    #   <example>
    #     <PROVIDE AN EXAMPLE>
    #   </example>
    #   <current_summary>{{.PrevSummary}}</current_summary>
    #   <new_lines>{{.MessagesJoined}}</new_lines>
    #   Response without preamble.
    #
    # If left empty, the default Anthropic summary prompt from zep/pkg/extractors/prompts.go will be used.
    anthropic: |

    # OpenAI summarizer prompt configuration.
    # Guidelines:
    # - Include {{.PrevSummary}} and {{.MessagesJoined}} as template variables.
    # - Provide a clear example within the prompt.
    #
    # Example format:
    # openai: |
    #   <YOUR INSTRUCTIONS HERE>
    #   Example:
    #     <PROVIDE AN EXAMPLE>
    #   Current summary: {{.PrevSummary}}
    #   New lines of conversation: {{.MessagesJoined}}
    #   New summary:`
    #
    # If left empty, the default OpenAI summary prompt from zep/pkg/extractors/prompts.go will be used.
    openai: |
        Review the Current Content, if there is one, and the New Lines of the provided conversation. Create a concise summary
        of the conversation, adding from the New Lines to the Current summary.
        If the New Lines are meaningless, return the Current Content.
        Current summary:
        {{.PrevSummary}}
        New lines of conversation:
        {{.MessagesJoined}}
        New summary:

Also localAI should have bowh models:

  • For chat inference: gpt-3.5-turbo-1106
  • For embeddings: text-embedding-ada-002

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant