deepwiki-open icon indicating copy to clipboard operation
deepwiki-open copied to clipboard

Please check that your repository exists and is public

Open banlanzs opened this issue 1 year ago • 12 comments

Image

banlanzs avatar May 27 '25 15:05 banlanzs

same problem

goodCircle avatar May 28 '25 03:05 goodCircle

I have the same problem. It works with some public repos but not with others. Is there a special structure that the public repo should follow?

javoxs avatar May 28 '25 13:05 javoxs

I have the same problem. It works with some public repos but not with others. Is there a special structure that the public repo should follow?

For example? Can you give me a link so I can test it? Thanks

banlanzs avatar May 28 '25 13:05 banlanzs

I have the same problem. It works with some public repos but not with others. Is there a special structure that the public repo should follow?

For example? Can you give me a link so I can test it? Thanks

Hi banlanzs, I chose randomly this repository https://github.com/adrianhajdin/project_chat_application. I'm having this output in the terminal. I'm using only OpenAI key, I was wondering that maybe both Google API key and Open AI API key are mandatory?

`2025-05-28 14:34:44,029 - 77 websocket_wiki.py:handle_websocket_chat - INFO - Request size: 1231 tokens 2025-05-28 14:34:44,050 - 74 prompt_builder.py:init - INFO - Prompt has variables: ['schema'] 2025-05-28 14:34:44,051 - 74 prompt_builder.py:init - INFO - Prompt has variables: ['schema'] 2025-05-28 14:34:44,052 - 71 rag.py:call - INFO - Dialog turns list exists but is empty 2025-05-28 14:34:44,052 - 85 rag.py:call - INFO - Returning 0 dialog turns from memory 2025-05-28 14:34:44,071 - 79 grad_component.py:init - INFO - EvalFnToTextLoss: No backward engine provided. Creating one using model_client and model_kwargs. 2025-05-28 14:34:44,077 - 74 prompt_builder.py:init - INFO - Prompt has variables: ['system_prompt', 'contexts', 'input_str', 'conversation_history', 'output_format_str'] 2025-05-28 14:34:44,077 - 180 generator.py:init - INFO - Generator Generator initialized. 2025-05-28 14:34:44,077 - 687 data_pipeline.py:_create_repo - INFO - Preparing repo storage for https://github.com/adrianhajdin/project_chat_application... 2025-05-28 14:34:44,077 - 717 data_pipeline.py:_create_repo - INFO - Repository already exists at /home/jhc/.adalflow/repos/project_chat_application. Using existing repository. 2025-05-28 14:34:44,078 - 731 data_pipeline.py:_create_repo - INFO - Repo paths: {'save_repo_dir': '/home/jhc/.adalflow/repos/project_chat_application', 'save_db_file': '/home/jhc/.adalflow/databases/project_chat_application.pkl'} 2025-05-28 14:34:44,078 - 754 data_pipeline.py:prepare_db_index - INFO - Loading existing database... 2025-05-28 14:34:44,079 - 335 component.py:_restore_value - INFO - Restoring class using from_dict TextSplitter, {'type': 'TextSplitter', 'data': {'_components': {'_ordered_dict': True, 'data': []}, '_parameters': {'_ordered_dict': True, 'data': []}, 'training': False, 'teacher_mode': False, 'tracing': False, 'name': 'TextSplitter', '_init_args': {'split_by': 'word', 'chunk_size': 800, 'chunk_overlap': 200, 'batch_size': 1000, 'separators': {'page': '\x0c', 'passage': '\n\n', 'word': ' ', 'sentence': '.', 'token': ''}}, 'split_by': 'word', 'separators': {'page': '\x0c', 'passage': '\n\n', 'word': ' ', 'sentence': '.', 'token': ''}, 'chunk_size': 350, 'chunk_overlap': 100, 'batch_size': 1000}} 2025-05-28 14:34:44,079 - 335 component.py:_restore_value - INFO - Restoring class using from_dict ToEmbeddings, {'type': 'ToEmbeddings', 'data': {'_components': {'_ordered_dict': True, 'data': [('embedder', {'type': 'Embedder', 'data': {'_components': {'_ordered_dict': True, 'data': [('model_client', {'type': 'OpenAIClient', 'data': {'_components': {'_ordered_dict': True, 'data': []}, '_parameters': {'_ordered_dict': True, 'data': []}, 'training': False, 'teacher_mode': False, 'tracing': False, 'name': 'OpenAIClient', '_init_args': {'api_key': None, 'chat_completion_parser': None, 'input_type': 'text', 'base_url': None, 'env_base_url_name': 'OPENAI_BASE_URL', 'env_api_key_name': 'OPENAI_API_KEY'}, '_api_key': None, '_env_api_key_name': 'OPENAI_API_KEY', '_env_base_url_name': 'OPENAI_BASE_URL', 'base_url': 'https://api.openai.com/v1', 'chat_completion_parser': <function get_first_message_content at 0x7fb46033ccc0>, '_input_type': 'text', '_api_kwargs': {'model': 'text-embedding-3-small', 'dimensions': 256, 'encoding_format': 'float', 'input': [. . . . }}} 2025-05-28 14:34:44,148 - 759 data_pipeline.py:prepare_db_index - INFO - Loaded 24 documents from existing database 2025-05-28 14:34:44,149 - 411 rag.py:prepare_retriever - INFO - Loaded 24 documents for retrieval 2025-05-28 14:34:44,149 - 325 rag.py:_validate_and_filter_embeddings - WARNING - Document 0 has empty embedding vector, skipping 2025-05-28 14:34:44,149 - 325 rag.py:_validate_and_filter_embeddings - WARNING - Document 1 has empty embedding vector, skipping 2025-05-28 14:34:44,149 - 325 rag.py:_validate_and_filter_embeddings - WARNING - Document 2 has empty embedding vector, skipping . . . .

2025-05-28 14:34:44,151 - 325 rag.py:_validate_and_filter_embeddings - WARNING - Document 23 has empty embedding vector, skipping 2025-05-28 14:34:44,151 - 335 rag.py:_validate_and_filter_embeddings - ERROR - No valid embeddings found in any documents 2025-05-28 14:34:44,151 - 109 websocket_wiki.py:handle_websocket_chat - ERROR - No valid embeddings found: No valid documents with embeddings found. Cannot create retriever.`

Image

Image

javoxs avatar May 28 '25 14:05 javoxs

我也有同样的问题。它适用于一些公共仓库,但不能适用于其他仓库。公共仓库是否应该遵循某种特殊的结构?

比如说?能给我个链接让我测试一下吗?谢谢

嗨,banlanzs,我随机选择了这个仓库https://github.com/adrianhajdin/project_chat_application。我在终端里看到了这个输出。我只使用了 OpenAI 密钥,我想知道 Google API 密钥和 Open AI API 密钥是否都是必需的?

`2025-05-28 14:34:44,029 - 77 websocket_wiki.py:handle_websocket_chat - INFO - 请求大小:1231 个令牌 2025-05-28 14:34:44,050 - 74 prompt_builder.py:init - INFO - 提示具有变量:['schema'] 2025-05-28 14:34:44,051 - 74 prompt_builder.py:init - INFO - 提示具有变量:['schema'] 2025-05-28 14:34:44,052 - 71 rag.py:call - INFO - 对话框显示列表存在但为空 2025-05-28 14:34:44,052 - 85 rag.py:call - INFO - 从内存返回 0 个对话回合 2025-05-28 14:34:44,071 - 79 grad_component.py: init - INFO - EvalFnToTextLoss:未提供后向引擎。使用 model_client 和 model_kwargs 创建一个。2025-05-28 14:34:44,077 - 74 prompt_builder.py: init - INFO - 提示包含变量:['system_prompt', 'contexts', 'input_str', 'conversation_history', 'output_format_str'] 2025-05-28 14:34:44,077 - 180 generator.py: init - INFO - 生成器 生成器已初始化。 2025-05-28 14:34:44,077 - 687 data_pipeline.py:_create_repo - INFO - 正在为https://github.com/adrianhajdin/project_chat_application 准备 repo 存储... 2025-05-28 14:34:44,077 - 717 data_pipeline.py:_create_repo - INFO - 存储库已存在于 /home/jhc/.adalflow/repos/project_chat_application。使用现有存储库。 2025-05-28 14:34:44,078 - 731 data_pipeline.py:_create_repo - INFO - Repo 路径:{'save_repo_dir': '/home/jhc/.adalflow/repos/project_chat_application', 'save_db_file': '/home/jhc/.adalflow/databases/project_chat_application.pkl'} 2025-05-28 14:34:44,078 - 754 data_pipeline.py:prepare_db_index - INFO - 正在加载现有数据库... 2025-05-28 14:34:44,079 - 335 component.py:_restore_value - INFO - 使用 from_dict TextSplitter 恢复类,{'type': 'TextSplitter','数据':{'_components':{'_ordered_dict':True,'数据':[]},'_parameters':{'_ordered_dict':True,'数据':[]},'训练':False,'teacher_mode':False,'跟踪':False,'名称':'TextSplitter','_init_args':{'split_by':'word','chunk_size':800,'chunk_overlap':200,'batch_size':1000,'分隔符':{'page':'\ x0c','passage':'\ n \ n','word':' ','句子':'。','token':''}}, 'split_by':'word','separators':{'page':'\x0c','passage':'\n\n','word':' ','sentence':'.','token':''},'chunk_size':350,'chunk_overlap':100,'batch_size':1000}} 2025-05-28 14:34:44,079 - 335 component.py:_restore_value - INFO - 使用 from_dict ToEmbeddings 恢复类,{'type':'ToEmbeddings','data':{'_components':{'_ordered_dict':True,'data':[('embedder',{'type':'Embedder','data':{'_components':{'_ordered_dict':True,'data':[('model_client',{'type':'OpenAIClient','data':{'_components':{'_ordered_dict':True,'data':[]},'_parameters':{'_ordered_dict':True,'data':[]},'training':False,'teacher_mode': False,'tracing':False,'name':'OpenAIClient','_init_args':{'api_key':None,'chat_completion_parser':None,'input_type':'text','base_url':None,'env_base_url_name':'OPENAI_BASE_URL','env_api_key_name':'OPENAI_API_KEY'},'_api_key':None,'_env_api_key_name':'OPENAI_API_KEY','_env_base_url_name':'OPENAI_BASE_URL','base_url':'https://api.openai.com/v1','chat_completion_parser':<function get_first_message_content at 0x7fb46033ccc0>,'_input_type':'text','_api_kwargs':{'model':'text-embedding-3-small','dimensions':256,'encoding_format':'float','input':[... . . . }}} 2025-05-28 14:34:44,148 - 759 data_pipeline.py:prepare_db_index - INFO - 从现有数据库加载 24 个文档 2025-05-28 14:34:44,149 - 411 rag.py:prepare_retriever - INFO - 加载 24 个文档用于检索 2025-05-28 14:34:44,149 - 325 rag.py:_validate_and_filter_embeddings - 警告 - 文档 0 具有空嵌入向量,跳过 2025-05-28 14:34:44,149 - 325 rag.py:_validate_and_filter_embeddings - 警告 - 文档 1 具有空嵌入向量,跳过 2025-05-28 14:34:44,149 - 325 rag.py:_validate_and_filter_embeddings - 警告 - 文档 2 具有 空嵌入 向量 ,跳过 ......

2025-05-28 14:34:44,151 - 325 rag.py:_validate_and_filter_embeddings - 警告 - 文档 23 的嵌入向量为空,正在跳过 2025-05-28 14:34:44,151 - 335 rag.py:_validate_and_filter_embeddings - 错误 - 未在任何文档中找到有效的嵌入 2025-05-28 14:34:44,151 - 109 websocket_wiki.py:handle_websocket_chat - 错误 - 未找到有效的嵌入:未找到包含嵌入的有效文档。无法创建检索器。`

Image

Image

I still can't get it to work here, I've put the openai, gemini, and openrouter API keys into the environment variable, and it still doesn't work, I read the deployment docs and it looks like you have to put the key in even if you're not using the OpenAI API.

Image

banlanzs avatar May 28 '25 16:05 banlanzs

Yes, gemini api key is required if you're using gemini model, currently we are hardcoding default embedder to use OpenAI's "text-embedding-3-small" in embedder.json, which indirectly forcing OPENAI_API_KEY as a must have environment key (that will soon be optional after this PR).

If you're still getting error, investigate your python backend error. It will provide you more meaningful error.

A common one is permission issue or API credit balance required.

https://github.com/AsyncFuncAI/deepwiki-open/pull/153

I just tried it with https://github.com/adrianhajdin/project_chat_application

Seems to work fine on my end. Note: I am running everything locally, npm run dev + python -m api.main Image

sng-asyncfunc avatar May 28 '25 16:05 sng-asyncfunc

Yes, gemini api key is required if you're using gemini model, currently we are hardcoding default embedder to use OpenAI's "text-embedding-3-small" in embedder.json, which indirectly forcing OPENAI_API_KEY as a must have environment key (that will soon be optional after this PR).

If you're still getting error, investigate your python backend error. It will provide you more meaningful error.

A common one is permission issue or API credit balance required.

https://github.com/AsyncFuncAI/deepwiki-open/pull/153

I just tried it with https://github.com/adrianhajdin/project_chat_application

Seems to work fine on my end. Note: I am running everything locally, npm run dev + python -m api.main Image

Ok, I'll test it again myself, maybe it's because the Gemini key I'm using isn't on a paid plan, causing some limitations, I'll try replacing it with a paid plan, thank you!🫡

banlanzs avatar May 28 '25 16:05 banlanzs

Yes, gemini api key is required if you're using gemini model, currently we are hardcoding default embedder to use OpenAI's "text-embedding-3-small" in embedder.json, which indirectly forcing OPENAI_API_KEY as a must have environment key (that will soon be optional after this PR). If you're still getting error, investigate your python backend error. It will provide you more meaningful error. A common one is permission issue or API credit balance required. #153 I just tried it with https://github.com/adrianhajdin/project_chat_application Seems to work fine on my end. Note: I am running everything locally, npm run dev + python -m api.main Image

Ok, I'll test it again myself, maybe it's because the Gemini key I'm using isn't on a paid plan, causing some limitations, I'll try replacing it with a paid plan, thank you!🫡

That shouldn't be the case, i am using Free Gemini plan, you should check OPENAI_API_KEY. At this point, we are all guessing, you need to verify your logs in python backend. You should be able to see what error causing it to not return a valid response.

sng-asyncfunc avatar May 28 '25 16:05 sng-asyncfunc

That shouldn't be the case, i am using Free Gemini plan, you should check OPENAI_API_KEY. At this point, we are all guessing, you need to verify your logs in python backend. You should be able to see what error causing it to not return a valid response.

Okay, I'll test it. Thank you.🥰

banlanzs avatar May 28 '25 17:05 banlanzs

Hi everyone, after adding a Google API key and failing trying a lot of things, I decided to change the name of the repo that I wanted to analyze from http://github.com/user/w--something-something to http://github.com/user/something and it works! I wonder if the hyphens were a problem

javoxs avatar May 28 '25 19:05 javoxs

Hi everyone, after adding a Google API key and failing trying a lot of things, I decided to change the name of the repo that I wanted to analyze from http://github.com/user/w--something-something to http://github.com/user/something and it works! I wonder if the hyphens were a problem

May I ask what you mean by that?

banlanzs avatar May 29 '25 08:05 banlanzs

That shouldn't be the case, i am using Free Gemini plan, you should check OPENAI_API_KEY. At this point, we are all guessing, you need to verify your logs in python backend. You should be able to see what error causing it to not return a valid response.

Unfortunately, it still fails, once I was using https://github.com/openai/codex I already saw the operation after clone and then it suddenly fails Any further attempts after that have failed to display straight away: 2025-05-29 06:38:09,834 - 335 rag.py:_validate_and_filter_embeddings - ERROR - No valid embeddings found in any documents

2025-05-29 06:38:09,834 - 109 websocket_wiki.py:handle_websocket_chat - ERROR - No valid embeddings found: No valid documents with embeddings found . Cannot create retriever.

banlanzs avatar May 29 '25 08:05 banlanzs