Skip to content

Commit

Permalink
hotfix (kafka): correct crawl response key
Browse files Browse the repository at this point in the history
  • Loading branch information
karahan-sahin committed Feb 12, 2024
1 parent 6dc697d commit f3968dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/src/libs/kafka-indexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export const createIndexItemEvent = async (id) => {
await indexSession.did.authenticate();

console.log("Indexer Item URL", `${process.env.LLM_INDEXER_HOST}/indexer/embeddings`)
if (indexItem.content) {

if (indexItem.item.content) {

const embeddingResponse = await axios.post(`${process.env.LLM_INDEXER_HOST}/indexer/embeddings`, {
content: indexItem.content
content: indexItem.item.content
})

const embeddingService = new EmbeddingService().setSession(indexSession)
Expand All @@ -44,7 +44,7 @@ export const createIndexItemEvent = async (id) => {
console.log("Embedding created", embedding.id)
}

console.log('No content found not indexing document')
console.log('No content found, createIndexItem event incomplete')

} catch (e) {
console.log("Indexer error:", e.message);
Expand Down

0 comments on commit f3968dc

Please sign in to comment.