Skip to content

Commit

Permalink
Add new case studies and remove chat sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
while-basic committed Dec 2, 2024
1 parent ab44a3f commit f3598d6
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 191 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ This list is prioritized from easiest to most challenging tasks. It should be up
- [x] Add footer to home page

### High Priority Tasks
- [ ] Chat modes should not work when not signed in
- [ ] Make profile data persistent
- [ ] Ability to delete conversations
- [ ] Add social media links
- [ ] Fix light/dark modes
Expand Down
109 changes: 95 additions & 14 deletions app/case-studies/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ import { useRouter } from 'next/navigation';

const caseStudies = [
{
title: "EcoTrack",
description: "Environmental monitoring platform",
challenge: "Creating a scalable system for real-time environmental data tracking and visualization.",
solution: "Developed a robust platform using React and D3.js for data visualization, with Node.js backend for real-time data processing.",
impact: "Enabled organizations to monitor environmental metrics in real-time and make data-driven decisions.",
technologies: ["React", "D3.js", "Node.js"],
slug: "ecotrack"
title: "Medchat",
description: "AI-powered chatbot",
challenge: "Creating an AI-powered chatbot that assists medical professionals with real-time diagnosis and medical literature recommendations.",
solution: "Developed a chatbot that leverages AI to provide real-time diagnoses and medical literature recommendations.",
impact: "Enhanced patient care and medical literacy for medical professionals.",
technologies: ["OpenAI API", "React", "Next.js"],
slug: "medchat"
},
{
title: "SmartBudget",
description: "AI-powered personal finance app",
challenge: "Building an intelligent system for personal finance management and insights.",
solution: "Implemented AI algorithms for expense analysis and financial recommendations.",
impact: "Helped users make better financial decisions through personalized insights and recommendations.",
technologies: ["AI/ML", "Personal Finance APIs"],
slug: "smartbudget"
title: "Midisaber",
description: "Music production tool",
challenge: "Creating a unique music production tool that leverages motion-controlled MIDI interfaces.",
solution: "Built a music production tool that uses MIDI interfaces to control audio effects and create unique music compositions.",
impact: "Provided a creative and immersive experience for music producers and artists.",
technologies: ["MIDI Interfaces", "Audio Effects", "React"],
slug: "midisaber"
},
{
title: "Gemini Pro Vision",
Expand All @@ -29,6 +29,87 @@ const caseStudies = [
impact: "Created an accessible interface for AI-powered visual analysis and communication.",
technologies: ["Google Gemini Pro API", "Computer Vision", "Text-to-Speech", "React"],
slug: "gemini-pro-vision"
},
{
title: "Law-GPT",
description: "Legal assistant",
challenge: "Creating a legal assistant that provides case law summaries, legal precedent analysis, and document drafting.",
solution: "Developed a legal assistant that leverages AI to provide case law summaries, legal precedent analysis, and document drafting.",
impact: "Enhanced legal literacy and knowledge for lawyers and legal professionals.",
technologies: ["OpenAI API", "LangChain", "React"],
slug: "law-gpt"
},
{
title: "Blockchain TLD Service",
description: "Blockchain TLD service",
challenge: "Creating a blockchain-based TLD service for domain registration and management.",
solution: "Built a blockchain-based TLD service for domain registration and management.",
impact: "Provided a secure and decentralized platform for domain ownership and management.",
technologies: ["Blockchain", "Solidity", "React"],
slug: "blockchain-tld-service"
},
{
title: "3D Blender Model",
description: "3D model of a floating metal orb",
challenge: "Creating a 3D model of a floating metal orb using Blender.",
solution: "Built a 3D model of a floating metal orb using Blender.",
impact: "Provided a visually appealing and interactive representation of a floating metal orb.",
technologies: ["Blender", "3D Modeling", "React"],
slug: "3d-blender-model"
},
{
title: "Unreal Engine Game Environment",
description: "Game environment",
challenge: "Creating a game environment using Unreal Engine.",
solution: "Built a game environment using Unreal Engine.",
impact: "Provided a realistic and immersive game experience for players.",
technologies: ["Unreal Engine", "Game Development", "React"],
slug: "unreal-engine-game-environment"
},
{
title: "Unity Game Environment",
description: "Game environment",
challenge: "Creating a game environment using Unity.",
solution: "Built a game environment using Unity.",
impact: "Provided a realistic and immersive game experience for players.",
technologies: ["Unity", "Game Development", "React"],
slug: "unity-game-environment"
},
{
title: "Amica Medical Chatbot",
description: "AI-powered chatbot",
challenge: "Creating an AI-powered chatbot that assists medical professionals with real-time diagnosis and medical literature recommendations.",
solution: "Developed a chatbot that leverages AI to provide real-time diagnoses and medical literature recommendations.",
impact: "Enhanced patient care and medical literacy for medical professionals.",
technologies: ["OpenAI API", "React", "Next.js"],
slug: "amica-medical-chatbot"
},
{
title: "Chattersync",
description: "AI-powered chatbot",
challange: "Creating an AI-powered chatbot that talks to itself and provides real-time responses.",
solution: "Developed a chatbot that leverages AI to provide real-time responses.",
impact: "Enhanced user experience and engagement for users.",
technologies: ["OpenAI API", "React", "Next.js"],
slug: "chattersync"
},
{
title: "Gemini Pro Vision",
description: "Computer vision and text-to-speech application",
challenge: "Integrating Google's Gemini Pro API for real-time vision and speech capabilities in a web interface.",
solution: "Built a web application that leverages machine learning for visual recognition and text generation.",
impact: "Created an accessible interface for AI-powered visual analysis and communication.",
technologies: ["Google Gemini Pro API", "Computer Vision", "Text-to-Speech", "React"],
slug: "gemini-pro-vision"
},
{
title: "Replicate SDXL Image Generator",
description: "Image generator",
challenge: "Creating an image generator using the Replicate SDXL API.",
solution: "Built an image generator using the Replicate SDXL API.",
impact: "Provided a powerful and flexible tool for generating high-quality images.",
technologies: ["Replicate SDXL API", "Image Generation", "React"],
slug: "replicate-sdxl-image-generator"
}
];

Expand Down
66 changes: 0 additions & 66 deletions app/gallery/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,72 +79,6 @@ export default function GalleryPage() {
"/images/electrical/wiring-7.jpg",
]
},
{
title: "SDXL Image Generation",
category: "Software Development",
description: "Advanced AI image generation using Stable Diffusion XL",
imageSrc: "/images/gallery/sdxl.jpg",
additionalImages: [
"/images/gallery/sdxl/1.jpg",
"/images/gallery/sdxl/2.jpg",
"/images/gallery/sdxl/3.jpg",
]
},
{
title: "EcoTrack",
description: "Environmental monitoring dashboard for real-time data analysis",
category: "Software Development",
imageSrc: "/images/gallery/ecotrack.jpg",
additionalImages: [
"/images/gallery/ecotrack/1.jpg",
"/images/gallery/ecotrack/2.jpg",
"/images/gallery/ecotrack/3.jpg",
]
},
{
title: "SmartBudget",
description: "Personal finance management application with AI insights",
category: "Software Development",
imageSrc: "/images/gallery/smartbudget.jpg",
additionalImages: [
"/images/gallery/smartbudget/1.jpg",
"/images/gallery/smartbudget/2.jpg",
"/images/gallery/smartbudget/3.jpg",
]
},
{
title: "Gemini Pro Vision",
category: "Software Development",
description: "AI-powered image analysis and generation platform",
imageSrc: "/images/gallery/gemini.jpg",
additionalImages: [
"/images/gallery/gemini/1.jpg",
"/images/gallery/gemini/2.jpg",
"/images/gallery/gemini/3.jpg",
]
},
{
title: "MIDI Saber",
category: "Personal Projects",
description: "Interactive musical instrument using motion sensors",
imageSrc: "/images/projects/midi-saber.png",
additionalImages: [
"/images/projects/midi-saber.png",
"/images/gallery/midi-saber/2.jpg",
"/images/gallery/midi-saber/3.jpg",
]
},
{
title: "SDXL Image Generation",
category: "Software Development",
description: "Advanced AI image generation using Stable Diffusion XL",
imageSrc: "/images/gallery/sdxl.jpg",
additionalImages: [
"/images/gallery/sdxl/1.jpg",
"/images/gallery/sdxl/2.jpg",
"/images/gallery/sdxl/3.jpg",
]
}
];

const handleCategoryClick = (category: string) => {
Expand Down
6 changes: 3 additions & 3 deletions app/links/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ const links = {
{
title: "GitHub",
description: "Check out my open source projects and contributions",
url: "https://github.com/chriscelaya",
url: "https://github.com/while-basic",
icon: <Github className="w-5 h-5" />,
},
{
title: "LinkedIn",
description: "Connect with me professionally",
url: "https://linkedin.com/in/chriscelaya",
url: "https://linkedin.com/in/christophercelaya",
icon: <Linkedin className="w-5 h-5" />,
},
],
Expand All @@ -42,7 +42,7 @@ const links = {
{
title: "SoundCloud",
description: "Listen to my music productions and mixes",
url: "https://soundcloud.com/chriscelaya",
url: "https://soundcloud.com/",
icon: <Headphones className="w-5 h-5" />,
},
],
Expand Down
95 changes: 7 additions & 88 deletions components/chat/chat-interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ import { useState } from 'react'
import { MessageList } from './message-list'
import { ImageGeneration } from './image-generation'
import { RealtimeChat } from './realtime-chat'
import { Message, Conversation, TokenUsage } from '@/lib/chat'
import { Message, Conversation } from '@/lib/chat'
import { Button } from "@/components/ui/button"
import { Textarea } from "@/components/ui/textarea"
import { useToast } from "@/components/ui/use-toast"
import { TokenDisplay } from './token-display'
import { ModelDisplay } from './model-display'
import { SystemPrompt } from './system-prompt'
import { ChevronLeft, ChevronRight, Settings2, Sliders, Plus } from "lucide-react"
import { Slider } from "@/components/ui/slider"
import { Separator } from "@/components/ui/separator"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { ChevronLeft } from "lucide-react"

interface ChatInterfaceProps {
conversation: Conversation | null
Expand All @@ -25,14 +19,9 @@ export function ChatInterface({ conversation, onNewMessage }: ChatInterfaceProps
const [inputMessage, setInputMessage] = useState('')
const { toast } = useToast()
const [isLoading, setIsLoading] = useState(false)
const [tokenUsage, setTokenUsage] = useState<TokenUsage | null>(null)
const [showLeftSidebar, setShowLeftSidebar] = useState(true)
const [temperature, setTemperature] = useState(1.0)
const [maxTokens, setMaxTokens] = useState(2048)
const [topP, setTopP] = useState(1.0)
const [frequencyPenalty, setFrequencyPenalty] = useState(0)
const [presencePenalty, setPresencePenalty] = useState(0)
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [isImageMode, setIsImageMode] = useState(false)
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [isRealtimeMode, setIsRealtimeMode] = useState(false)

const handleSubmit = async () => {
Expand All @@ -47,12 +36,7 @@ export function ChatInterface({ conversation, onNewMessage }: ChatInterfaceProps
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
messages: updatedMessages,
temperature,
maxTokens,
topP,
frequencyPenalty,
presencePenalty
messages: updatedMessages
})
})

Expand All @@ -62,11 +46,6 @@ export function ChatInterface({ conversation, onNewMessage }: ChatInterfaceProps

const data = await response.json()

// Update token usage from response
if (data.usage) {
setTokenUsage(data.usage)
}

const newAssistantMessage = { role: 'assistant' as const, content: data.message }
const finalMessages = [...updatedMessages, newAssistantMessage]
onNewMessage(finalMessages)
Expand Down Expand Up @@ -97,62 +76,11 @@ export function ChatInterface({ conversation, onNewMessage }: ChatInterfaceProps
variant="ghost"
size="icon"
className="absolute left-2 top-2 z-10 shrink-0"
onClick={() => setShowLeftSidebar(!showLeftSidebar)}
onClick={() => {}}
>
{showLeftSidebar ? <ChevronLeft /> : <ChevronRight />}
<ChevronLeft />
</Button>

{/* Left Sidebar */}
<div className={`${showLeftSidebar ? 'w-64' : 'w-0'} bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 border-r border-border/40 transition-all duration-300 overflow-hidden`}>
<div className="p-4">
<div className="space-y-2">
<Button
variant="outline"
className="w-full justify-start"
onClick={() => {
onNewMessage([])
}}
>
<Plus className="mr-2 h-4 w-4" />
New Chat
</Button>
<Button
variant="ghost"
className="w-full justify-start"
onClick={() => {
setIsImageMode(false)
setIsRealtimeMode(false)
}}
>
<span className="mr-2">💬</span>
Chat
</Button>
<Button
variant="ghost"
className="w-full justify-start"
onClick={() => {
setIsImageMode(true)
setIsRealtimeMode(false)
}}
>
<span className="mr-2"></span>
Image Generation
</Button>
<Button
variant="ghost"
className="w-full justify-start"
onClick={() => {
setIsImageMode(false)
setIsRealtimeMode(true)
}}
>
<span className="mr-2">🎤</span>
Realtime
</Button>
</div>
</div>
</div>

{/* Main Chat Area */}
<div className="flex-1 flex flex-col min-h-0">
{/* Top Bar */}
Expand All @@ -161,10 +89,6 @@ export function ChatInterface({ conversation, onNewMessage }: ChatInterfaceProps
<h2 className="text-sm font-medium">
{isRealtimeMode ? 'Realtime Chat' : isImageMode ? 'Image Generation' : 'Chat'}
</h2>
<div className="flex items-center gap-3 text-sm text-muted-foreground">
<ModelDisplay model="GPT-3.5" />
<TokenDisplay usage={tokenUsage} />
</div>
</div>
<div className="flex gap-1.5">
<Button variant="ghost" size="sm">Clear</Button>
Expand Down Expand Up @@ -203,11 +127,6 @@ export function ChatInterface({ conversation, onNewMessage }: ChatInterfaceProps
{isLoading ? 'Sending...' : 'Send'}
</Button>
</div>
{tokenUsage && (
<div className="flex justify-end">
<TokenDisplay usage={tokenUsage} />
</div>
)}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion data/visitor-count.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"count":9}
{"count":10}
Loading

0 comments on commit f3598d6

Please sign in to comment.