Open-source AI Answer Engine -Morphic

An open-source AI answer engine that provides insightful answers and explores related topics. Learn how to build your own!

Morphic is an open-source project that combines the power of OpenAI with the flexibility of a generative UI to redefine how we find answers online.

It offers an answer engine where any question can be posed. The AI diligently searches the web to fetch and present the most accurate answer instantly.

Subscribe to our newsletter and get the top 10 AI tools and apps delivered straight to your inbox. Subscribe now!

Beyond responding directly to queries, Morphic also provides images and credible sources that accompany each answer and related questions to deepen understanding.

Morphic AI Search Engine

If the initial answer doesn’t fully address your query, you can engage in a back-and-forth dialogue with the AI to get a more comprehensive understanding. This interactive approach can be particularly helpful for complex or nuanced topics.

GitHub RepoLive Demo

How to deploy it:

1. Start by forking the Morphic repository to your Github account and then clone it to your local machine using the command:

git clone [email protected]:[YOUR_GITHUB_ACCOUNT]/morphic.git

2. Once you’ve cloned the repo, navigate to the Morphic directory and install the necessary dependencies:

cd morphic
bun i

3. Morphic relies on external services like OpenAI and Tavily AI to function. To use it, you’ll need to acquire API keys from these platforms and add them to a file named .env.local within the Morphic project directory. You can find instructions on obtaining API keys on their respective websites:

OpenAI: https://openai.com/

Tavily AI: https://tavily.com/

# Required
# The settings below are essential for the basic functionality of the system.

# OpenAI API key retrieved here: https://platform.openai.com/api-keys
OPENAI_API_KEY=[YOUR_OPENAI_API_KEY]

# Tavily API Key retrieved here: https://app.tavily.com/home
TAVILY_API_KEY=[YOUR_TAVILY_API_KEY]

# Upstash Redis URL and Token retrieved here: https://console.upstash.com/redis
UPSTASH_REDIS_REST_URL=[YOUR_UPSTASH_REDIS_REST_URL]
UPSTASH_REDIS_REST_TOKEN=[YOUR_UPSTASH_REDIS_REST_TOKEN]


# Optional
# The settings below can be used optionally as needed. They don't guarantee functionality.

# Used to set the base URL path for OpenAI API requests.
# If you need to set a BASE URL, uncomment and set the following:
# OPENAI_API_BASE=

# Used to set the model for OpenAI API requests.
# If not set, the default is gpt-4o.
# OPENAI_API_MODEL='gpt-4o'

# Only writers can set a specific model. It must be compatible with the OpenAI API.
# USE_SPECIFIC_API_FOR_WRITER=true

# Tavily API Key retrieved here: https://app.tavily.com/home
TAVILY_API_KEY=

# Upstash Redis URL and Token retrieved here: https://console.upstash.com/redis
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=

4. With the API keys in place, you’re ready to test drive Morphic! Run the following command to start the application locally. This will launch Morphic on your machine, typically accessible at http://localhost:3000.

bun dev

5. If you’d like to share your AI answer engine with the world, Morphic can be easily deployed on Vercel with just one click.

FAQs:

Q: What technologies are used in Morphic?
A: Morphic is built using the Next.js framework, the Vercel AI SDK for the generative UI, OpenAI for the language model, and the Tavily AI search API.

Q: Is Morphic free to use?
A: Yes, Morphic is an open-source project, so it is free to use and modify. However, using the OpenAI and Tavily APIs may require paid subscriptions depending on your usage.

Q: What are the benefits of using Morphic?
A: Morphic can save you time and effort by providing instant, reliable answers to your questions. It also generates related questions and allows for interactive back-and-forth to he

Q: Can I contribute to the Morphic project?
A: Absolutely! Morphic is open-source and welcomes contributions from the community. You can find the project on GitHub and contribute to its development.

Changelog:

05/25/2024

  • Refactor component to render LaTeX equations if patterns are found
  • removed unused state and logic
  • removed any types where possible
  • Update writer.tsx to use OpenAI SDK
  • Fix error handling in submit and writer functions

05/22/2024

  • Add ‘X-With-Generated-Alt’ header to retrieveTool API request
  • prevented search submit when no input value
  • Add Video Search Feature

05/19/2024

  • Refactor retrieveTool to use jina.ai
  • Refactor history component and add history list
  • Add restriction to retrieve tool
  • Refactor AI model usage

05/17/2024

  • Add Tool to Retrieve Page Content from Specific URLs

05/13/2024

  • Refactor researcher function and update tools
  • feat: Add current date and time to prompt for researcher
  • Refactor submit function to use latest messages
  • Support LaTeX format

05/13/2024

  • Make the share feature optional
  • Fix handle sharing and copying chat links
  • Update default model to gpt-4o

05/11/2024

  • Updated AI Sdk
  • Add docker-compose file
  • Remove logo from copilot
  • Enable sharing of search results

05/08/2024

  • Use Node.js runtime & move more components to RSC

05/07/2024

  • Add clear history functionality
  • fix history: chat maybe undefined

05/05/2024

  • Enable auto expanding textarea
  • Add check for ‘answer’ message type in AI state
  • Update chat input styling and behavior

05/03/2024

  • Add Chat history support
  • Refactor message filtering
  • Fix chat messages
  • Update AI state with answer and type
  • Add Upstash Redis configuration
  • Add search history support

04/27/2024

  • Add Cloudflare Pages deployment option
  • Added Anthropic model added
  • Removed specific provider configuration temporarily
  • Fixed bugs
  • Refactored form position in ChatPanel component

04/24/2024

  • Add error handling for image loading
  • allow pointer events to pass through container
  • Remove unnecessary use client
  • Add rehype-external-links plugin to MemoizedReactMarkdown
  • Add remark-gfm plugin to MemoizedReactMarkdown
  • Update rehypePlugins and remarkPlugins in BotMessage component
  • Fix Researcher

04/20/2024

  • Add note about project focus and OpenAI models
  • Add writer agent that support specific APIs

04/18/2024

  • Update OpenAI import to @ai-sdk/openai
  • Add collapsible feature

04/16/2024

  • Fix taskManager error handling
  • Update language matching in query-suggestor and researcher agents
  • Add language matching for response in inquire function
  • Limit the number of messages

04/14/2024

  • Add metadataBase URL to metadata
  • Refactor researcher function and handle search errors
  • Allow users to customize the model

04/11/2024

  • Support OpenAI base URL configuration
  • Update OpenAI Model to gpt-4-turbo
  • Update opengraph-image

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!