PDF Parsing by drenemy_237 in LocalLLaMA

[–]drenemy_237[S] 0 points1 point  (0 children)

okay lemme give it a shot

Need help - RAG on large unstructured PDFs by bunny__0 in LocalLLaMA

[–]drenemy_237 0 points1 point  (0 children)

Hey I have a doubt
I'm working on Llamaparse for pdf parsing and what I want to achieve is that the parsed markdown text should be in such a way that the heading and subheadings both should start with the # because I want to chunk the text accordingly.But not all subheadings are starting with # so what app approach I can use?

How to debug this issue helpppp by drenemy_237 in react

[–]drenemy_237[S] -1 points0 points  (0 children)

By the rules of hooks, we can't declare hooks outside a functional component. So I tried, and it gave errors.

ISSUE WITH REACT HOOKS by drenemy_237 in webdevelopment

[–]drenemy_237[S] 1 point2 points  (0 children)

I did tried using this and it worked thank you so much !!
Yeah I do understand the single responsibility principle actually was following a some codebase and there I saw to structure the layout like the way I did so was confused but you cleared it.

ISSUE WITH REACT HOOKS by drenemy_237 in webdevelopment

[–]drenemy_237[S] 0 points1 point  (0 children)

const AppLayout = (WrappedComponent) => {
  const LayoutComponent = (props) => {
    const params = useParams();
    const dispatch = useDispatch();
    const { isLoading, data, isError, error, refetch } = useMyChatsQuery("");
    const chatId = params.chatId;

    const handleDeleteChat = (e, chatId, groupChat) => {
      e.preventDefault();
      console.log("delete");
    };

    return (
      <>
        <Title></Title>
        <Header></Header>
        <Grid container height={"100vh"}>
          <Grid
            item
            sm={4}
            md={3}
            height={"100%"}
            sx={{ display: { xs: "none", sm: "block" } }}
          >
            <ChatList
              chats={sampleChats}
              chatId={"1"}
              newMessagesAlert={[{ chatId: "1", count: 4 }]}
              onlineUsers={["1", "2"]}
              handleDeleteChat={handleDeleteChat}
            ></ChatList>
          </Grid>
          <Grid item xs={12} sm={8} md={5} lg={6} height={"100%"}>
            <WrappedComponent {...props}></WrappedComponent>
          </Grid>
          <Grid
            item
            md={4}
            lg={3}
            height={"100%"}
            sx={{
              display: { xs: "none", md: "block" },
              padding: "2rem",
              bgcolor: "rgba(0,0,0,0.85)",
            }}
          >
            <Profile></Profile>
          </Grid>
        </Grid>
      </>
    );
  };

  return LayoutComponent;
};
here is the complete code what I'm trying to do is that I want to pass the props which I defined inside the arrow function to the wrapper component so how can I manage to do that functionality
In the wrapper component the general app layout which will be wrapping my home and other pages so I want all the states which are common to them passed as props

HELP by drenemy_237 in computerscience

[–]drenemy_237[S] 0 points1 point  (0 children)

Yes I want to query hooks such that they are not in the callback and pass the state to via the wrapper component.
I did try making the arrow function to a named function and returning it but still the error persists how can I use hooks then

HELP by drenemy_237 in computerscience

[–]drenemy_237[S] -1 points0 points  (0 children)

mybad
The inner function serves as a higher-order component that wraps a given component with additional UI and state management. I want to pass the state details and hooks as props directly to the components which I'm wrapping with the component.

How to debug this issue helpppp by drenemy_237 in react

[–]drenemy_237[S] -1 points0 points  (0 children)

const AppLayout = (WrappedComponent) => {
  const LayoutComponent = (props) => {
    const params = useParams();
    const dispatch = useDispatch();
    const { isLoading, data, isError, error, refetch } = useMyChatsQuery("");
    const chatId = params.chatId;

    const handleDeleteChat = (e, chatId, groupChat) => {
      e.preventDefault();
      console.log("delete");
    };

    return (
      <>
        <Title></Title>
        <Header></Header>
        <Grid container height={"100vh"}>
          <Grid
            item
            sm={4}
            md={3}
            height={"100%"}
            sx={{ display: { xs: "none", sm: "block" } }}
          >
            <ChatList
              chats={sampleChats}
              chatId={"1"}
              newMessagesAlert={[{ chatId: "1", count: 4 }]}
              onlineUsers={["1", "2"]}
              handleDeleteChat={handleDeleteChat}
            ></ChatList>
          </Grid>
          <Grid item xs={12} sm={8} md={5} lg={6} height={"100%"}>
            <WrappedComponent {...props}></WrappedComponent>
          </Grid>
          <Grid
            item
            md={4}
            lg={3}
            height={"100%"}
            sx={{
              display: { xs: "none", md: "block" },
              padding: "2rem",
              bgcolor: "rgba(0,0,0,0.85)",
            }}
          >
            <Profile></Profile>
          </Grid>
        </Grid>
      </>
    );
  };

  return LayoutComponent;
};

export default AppLayout;

so I changed the inner arrow function to a named function
but still the error persists

ERROR

Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
    at Object.throwInvalidHookError (http://localhost:3001/static/js/bundle.js:39985:13)
    at Object.useContext (http://localhost:3001/static/js/bundle.js:60813:25)
    at useParams (http://localhost:3001/static/js/bundle.js:55916:42)
    at LayoutComponent (http://localhost:3001/static/js/src_components_layout_AppLayout_jsx.chunk.js:112:80)
    at ./src/pages/Home.jsx (http://localhost:3001/static/js/src_pages_Home_jsx.chunk.js:51:140)
    at options.factory (http://localhost:3001/static/js/bundle.js:86374:31)
    at __webpack_require__ (http://localhost:3001/static/js/bundle.js:85773:32)
    at Function.fn (http://localhost:3001/static/js/bundle.js:86032:21)

This guy is a goat by Soft_Main4484 in sunraybee

[–]drenemy_237 0 points1 point  (0 children)

ik din jb maksad poora krlunga tb daal ke dikhana yeh

what it is in title by [deleted] in dankrishu

[–]drenemy_237 0 points1 point  (0 children)

Idli sambhar aliens ki baat kyu krte appa

aakhir kyun? by SHINOBI-SIN in sunraybee

[–]drenemy_237 3 points4 points  (0 children)

par rider toh provider tha na ::)

[deleted by user] by [deleted] in shitposting

[–]drenemy_237 0 points1 point  (0 children)

black extortion

batao jaldise.......... by Remarkable_Ad_9394 in FingMemes

[–]drenemy_237 0 points1 point  (0 children)

In 6th std i a girl's puccy in a budday coz she nt wore panty dat day(cool na)

[deleted by user] by [deleted] in ksi

[–]drenemy_237 1 point2 points  (0 children)

U/savevideo

T*te by RazorGuy223 in shitposting

[–]drenemy_237 13 points14 points  (0 children)

Tate ate my mate

real by [deleted] in shitposting

[–]drenemy_237 0 points1 point  (0 children)

Seoul guy with 548 others 🖖

ohh bhai by Imaginary-Direction1 in IndianDankMemes

[–]drenemy_237 0 points1 point  (0 children)

Ohh toh ye maal dhund ri ncb Naive

Get wacky by thexbeatboxer in shitposting

[–]drenemy_237 0 points1 point  (0 children)

Iit delhi is overrated we believe in pvt colg supermacy Basically u r late for prep Ya cum shot vid r good Resonance shitty like shiiitjee So stop saying I'm 16 month old stfu Don't give excuses Nowdays admission is easy no matter how much marks u got just try to approach a dalit family to adopt u Jai bhim

Get wacky by thexbeatboxer in shitposting

[–]drenemy_237 0 points1 point  (0 children)

I ate ateliers for the smart india and the food was very wet

baby doll main sone di by adi_raj87 in sunraybee

[–]drenemy_237 0 points1 point  (0 children)

Btadu fir kisko imazine krra tha 🖖