Git Product home page Git Product logo

chat-docs-library's Introduction

Hi My name is Nikhil Sharma

FullStack Web Developer

I am Nikhil Sharma, a seasoned MERN (MongoDB, Express.js, React.js, Node.js) Developer with a distinguished two-year track record in shaping digital excellence. My expertise extends to the meticulous refinement of projects, such as the comprehensive redesign of Smelko's website and the development of a sophisticated delivery app reminiscent of Swiggy. In my role as a FullStack Developer at DotAgent, I architected seamless tech solutions. This included the integration of authentication using Supabase, meticulous data management, and the implementation of the cutting-edge ResumeGPT feature to elevate user experiences.

Skills

JavaScriptTypeScriptGitJavaC++CPythonHTML5ReactNextJsJQueryCSS3TailwindCSSChakra UIBootstrapRemixReduxMaterial UIWebpackNodeJSExpressMongoDBPostgreSQLFirebaseAppwriteSupabaseGraphQLAmazon Web ServicesDigital OceanDockerLinuxMacOSFigmaGoogle Cloud

Socials

niikkhilsharma

niikkhilsharma

chat-docs-library's People

Contributors

niikkhilsharma avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

mvandermeulen

chat-docs-library's Issues

In case of a failure of response from AI or any other kind of failure. The conversation id will be

The conversation id in the api/docs/nextjs/query is being created in the starting of the api router only. This could lead to a issue in which in the further code fails due to any error from openai or any other error then a conversation would be created but no message would be saved for that particular api call in the database.
To, resolve this issue kindly move the code for creating conversation object/model in the end just before the code where message (human message and AI response) are being saved into the database.

	if (conversationId) {
		const prevConversation = await prisma.Conversation.findUnique({
			where: {
				conversationId: conversationId,
			},
		})

		if (!prevConversation) {
			const newConversation = await prisma.Conversation.create({
				data: {
					title: userQuestion.slice(0, 20),
					userId: userId,
					modelName: 'NextJs',
					conversationId: conversationId,
				},
			})
			conversationModelId = newConversation.id
		} else {
			conversationModelId = prevConversation.id
		}
	} else {
		return NextResponse.json({ message: 'Please provide the conversationId' }, { status: 400 })
	}

Provide a auto-slide to the buttom when some text is generated.

In case of bard website or Chat GPT website we see a auto slide to bottom feature when ever a stream response is coming from the backend.
Currenlty on this website we see no such feature where the pages slides down to the bottom whenever the AI generate any response.

How to implement this feature.

  1. On the parent element of the element in which the chat is being rendered. Add a function called scrollIntoView() whenever a new response stream is generated.

Provide a code copy button.

When the AI response includes any code response the user should be able to copy that code by pressing the code copy button.

The code copy button should be just above the code only just like we see on the Chat GPT website.

Features to include in the copy button.

  1. It should have a button like animation means haptic press feedback.
  2. Should have a copy svg
  3. Text in the button should be "copy"
  4. If possible make a bar type like in the below image and add the language name on one end of that and on the other end the copy button. Just like in the below button. Try to make the copy button exactly like in the below image.
Screenshot 2024-02-11 at 05 30 05

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.