Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Search engine not work #338

Open
1 of 2 tasks
yaozhenghangma opened this issue Sep 14, 2024 · 3 comments
Open
1 of 2 tasks

[BUG] Search engine not work #338

yaozhenghangma opened this issue Sep 14, 2024 · 3 comments

Comments

@yaozhenghangma
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Vercel Runtime Logs

  • I have checked the Vercel Runtime Logs for errors (if applicable)

Current Behavior

I deployed the application on my computer using Docker Compose. The web page and GPT features are functioning well, but it seems like the search engine isn't working as expected. After searching "TiSe2" on web, here’s an example of what I see:

Screenshot 2024-09-14 at 13 16 15

The log file reports the following error:

Screenshot 2024-09-14 at 13 07 47

Expected Behavior

I hope the gpt can use results from search engine.

Steps To Reproduce

Here is my .env.local file:

# 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=my_openai_key

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

# Redis Configuration
USE_LOCAL_REDIS=true
LOCAL_REDIS_URL=redis://redis:6379 # or redis://redis:6379 if you're using docker compose

# 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]

# SearXNG Configuration
SEARXNG_API_URL=http://searxng:8080  # Replace with your local SearXNG API URL or docker http://searxng:8080
SEARCH_API=tavily  #  use searxng, tavily or exa
SEARXNG_SECRET="998b30cdd469ad4f70204d936134995b93b1e33ffdd1162c0430fffabde4f32d" # generate a secret key e.g. openssl rand -base64 32
SEARXNG_PORT=8080 # default port
SEARXNG_BIND_ADDRESS=0.0.0.0 # default address
SEARXNG_IMAGE_PROXY=true # enable image proxy
SEARXNG_LIMITER=false # can be enabled to limit the number of requests per IP address
SEARXNG_DEFAULT_DEPTH=advanced # Set to 'basic' or 'advanced', only affects SearXNG searches
SEARXNG_MAX_RESULTS=50 # Maximum number of results to return from SearXNG
SEARXNG_ENGINES=google,bing,wikipedia # Search engines to use
SEARXNG_TIME_RANGE=None # Time range for search results: day, week, month, year, or None (for all time)
SEARXNG_SAFESEARCH=0 # Safe search setting: 0 (off), 1 (moderate), 2 (strict)

# Optional
# The settings below can be used optionally as needed.

# 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=http://192.168.100.153:5000/v1

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

# Azure OpenAI API key retrieved here: https://oai.azure.com/resource/deployments/
# AZURE_API_KEY=

# The resource name is used in the assembled URL: https://{resourceName}.openai.azure.com/openai/deployments/{modelId}{path}.
# AZURE_RESOURCE_NAME=

# Used to set the deployment name for Azure OpenAI API requests.
# If not set, the default is gpt-4o.
# AZURE_DEPLOYMENT_NAME=

# If you want to use Google Generative AI instead of OpenAI, enable the following settings.
# Google Generative AI API key retrieved here: https://aistudio.google.com/app/apikey
# GOOGLE_GENERATIVE_AI_API_KEY=[YOUR_GOOGLE_GENERATIVE_AI_API_KEY]

# If you want to use Anthropic instead of OpenAI, enable the following settings.
# ANTHROPIC_API_KEY=[YOUR_ANTHROPIC_API_KEY]

# [Unstable] If you want to use Ollama, enable the following variables.
# OLLAMA_MODEL=[YOUR_OLLAMA_MODEL] # The main model to use. Recommended: mistral or openhermes
# OLLAMA_SUB_MODEL=[YOUR_OLLAMA_SUB_MODEL] # The sub model to use. Recommended: phi3 or llama3
# OLLAMA_BASE_URL=[YOUR_OLLAMA_URL] # The base URL to use. e.g. http://localhost:11434

# Only writers can set a specific model. It must be compatible with the OpenAI API.
#USE_SPECIFIC_API_FOR_WRITER=true
#SPECIFIC_API_BASE=http://192.168.100.153:5000/v1 # e.g. https://api.groq.com/openai/v1
#SPECIFIC_API_KEY=sk-rinj57f8hSwRx0gl9eC509Ba59Bb4e508dD9Fd68F3A5Cf07
#SPECIFIC_API_MODEL=gpt-4o # e.g. llama-3.1-70b-versatile

# enable the share feature
# If you enable this feature, separate account management implementation is required.
# ENABLE_SHARE=true

# enable the video search tool
# Serper API Key retrieved here: https://serper.dev/api-key
# SERPER_API_KEY=[YOUR_SERPER_API_KEY]

#NEXT_PUBLIC_BASE_URL=http://0.0.0.0:3000

By the way, I tried using SearXNG and Tavily, but neither of them worked.

Environment

- OS:
- Browser:

Anything else?

No response

@OiAnthony
Copy link

You can comment out the two environment variables in .env.local
image

@arsaboo
Copy link

arsaboo commented Sep 30, 2024

I am also seeing those errors. @OiAnthony I don't have those two environmental variables added.

@miurla
Copy link
Owner

miurla commented Oct 1, 2024

@yaozhenghangma Based on the logs, it seems that the search engine is not the issue, but rather the model is not calling the search. Additionally, an error is occurring during the generation of Related. There may be a problem with the model you specified. First, please confirm that it works without issues with OpenAI or another provider without specifying the basePath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants