Skip to content

Commit

Permalink
Iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed Jun 1, 2024
1 parent 0597a66 commit dc37752
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/src/libs/indexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Indexer {
// Check if the item is a webpage and has no content then return Exception
if (
indexItem.item.__typename === "WebPage" &&
indexItem.item.WebPage_content === ""
(!indexItem.item.WebPage_content || indexItem.item.WebPage_content === "")
) {
logger.warn(
"Step [0]: No content found, createIndexItem event incomplete",
Expand Down
2 changes: 1 addition & 1 deletion web-app/src/components/site/indexes/AskIndexes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const AskIndexes: FC<AskIndexesProps> = ({ chatID, sources }) => {
}, [fetchDefaultQuestions]);


const socketUrl = `${process.env.NEXT_PUBLIC_API_URL.replace(/^https/, 'ws')}${API_ENDPOINTS.DISCOVERY_UPDATES}`;
const socketUrl = `${process.env.NEXT_PUBLIC_API_URL.replace(/^https/, 'ws')}${API_ENDPOINTS.DISCOVERY_UPDATES.replace(":chatID", chatID)}`;
const ws = new WebSocket(socketUrl);
ws.onmessage = async (event) => {
console.log(event);
Expand Down
2 changes: 1 addition & 1 deletion web-app/src/services/api-service-new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const API_ENDPOINTS = {
CHAT_STREAM: "/chat_stream",
INDEXES: "/indexes/:id",
DEFAULT_QUESTIONS_OF_INDEX: "/discovery/questions",
DISCOVERY_UPDATES: "/discovery/:chatId/updates",
DISCOVERY_UPDATES: "/discovery/:chatID/updates",
GET_ALL_INDEXES: "/dids/:did/indexes",
CREATE_INDEX: "/indexes",
UPDATE_INDEX: "/indexes/:id",
Expand Down
1 change: 1 addition & 0 deletions web-app/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const DEFAULT_CREATE_LINK_TITLE = "Untitled Link";

export const API_ENDPOINTS = {
CHAT_STREAM: "discovery/chat",
DISCOVERY_UPDATES: "/discovery/:chatID/updates",
INDEXES: "/indexes",
GET_ALL_INDEXES: "/dids/:id/indexes",
GET_PROFILE: "/dids/:id/profile",
Expand Down

0 comments on commit dc37752

Please sign in to comment.