Skip to content
Open
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jspm_packages
.node_repl_history

# docker-compose test data
esdata
esdata*

# local config
config/local-*
Expand All @@ -48,3 +48,6 @@ config/local-*

# Prevent google-github-actions/auth credentials being committed to git by accident
gha-creds-*.json

# Claude Code local guidance
CLAUDE.md
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: "2"
services:
db-v9:
image: elasticsearch:9.2.2
image: elasticsearch:9.3.2
ports:
- "62222:9200"
volumes:
Expand All @@ -13,11 +13,12 @@ services:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" # Prevent elasticsearch eating up too much memory
# - "reindex.remote.whitelist=host.docker.internal:62222,ip:62222" # Allow reindex from old ES
- "discovery.type=single-node" # Single node mode for development
- "xpack.security.enabled=false" # ES 8+ enables HTTPS by default; disable for plaintext local dev
extra_hosts:
- "host.docker.internal:host-gateway" # Allow container to access host machine

kibana:
image: kibana:9.2.2
image: kibana:9.3.2
depends_on:
- db-v9
environment:
Expand All @@ -43,12 +44,12 @@ services:
ELASTICSEARCH_URL: "http://db-v9:9200"
URL_RESOLVER_URL: "url-resolver:4000"
ports:
- "5000:5000"
- "5001:5001"
- "5500:5500"

site:
image: cofacts/rumors-site:latest-en
ports:
- "3000:3000"
environment:
PUBLIC_API_URL: http://localhost:5000
PUBLIC_API_URL: http://localhost:5001
98 changes: 66 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@elastic/elasticsearch": "^9.0.0",
"@google-cloud/bigquery": "^6.2.0",
"@google-cloud/vision": "^3.1.4",
"@google/genai": "^1.6.0",
"@google/genai": "^2.0.1",
"@grpc/grpc-js": "^1.6.7",
"@grpc/proto-loader": "^0.5.0",
"@sinclair/typebox": "^0.33.22",
Expand Down
14 changes: 14 additions & 0 deletions src/graphql/models/AIResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ const AIResponse = new GraphQLInterfaceType({

case 'TRANSCRIPT':
return AITranscript;

case 'EMBEDDING':
return AIEmbedding;
}
},
});
Expand Down Expand Up @@ -93,6 +96,17 @@ export const AITranscript = new GraphQLObjectType({
},
});

export const AIEmbedding = new GraphQLObjectType({
name: 'AIEmbedding',
description:
'AI generated embedding vectors for the specified docId, used as cache for hybrid search. ' +
'The vector data itself is not exposed via GraphQL — only the cache metadata is queryable.',
interfaces: [Node, AIResponse],
fields: {
...commonAiResponseFields,
},
Comment on lines +105 to +107

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The AIEmbedding type is missing the text field. Since createEmbedding stores error messages in the text field when the status is ERROR, this field should be added to the GraphQL model to allow clients to retrieve error details.

  fields: {
    ...commonAiResponseFields,
    text: { type: GraphQLString },
  },

});

export const AIResponseConnection = createConnectionType(
'AIResponseConnection',
AIResponse
Expand Down
Loading
Loading