Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add question caching

オープン
#82 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
postgresql, python
領域
ai, backend, databases

調査の方向性

提案されている chat_completion フローから始め、embedding の生成、ベクトル検索、チャット履歴、completion の生成を含む既存の RAG リクエストパスを追跡します。実装前に、キャッシュの保存方法、一致判定の動作、キャッシュヒット時の戻り値を定義します。done には、両方のパスのテストを含む、動作するキャッシュヒットとキャッシュミスを含める必要があります。

索引モデルが issue の本文から書いたものです。

説明

Description

Add a question caching feature. Pseudocode based on other repo-

def chat_completion(user_input):
   # Generate embeddings from the user input
   user_embeddings = generate_embeddings(openai_client, user_input)
   # Query the chat history cache first to see if this question has been asked before
   cache_results = cache_search(vectors=user_embeddings , num_results=1)
 
   if len(cache_results) > 0:
       return cache_results[0]['completion'], True
   else:
       # Perform vector search 
       search_results = get_similar_docs(openai_client, dbsource, user_input, 3)
       print("Getting Chat History\n")
       # Chat history
       chat_history = get_chat_history(1)
 
       # Generate the completion
       print("Generating completions \n")
       completions_results = generatecompletionede(user_input, search_results, chat_history)
 
       # Cache the response
       cacheresponse(user_input, user_embeddings, completions_results)
 
       print("\n")
       # Return the generated LLM completion
       return completions_results['choices'][0]['message']['content'], False
主要言語
Python
スター
505
フォーク
1.1k
平均マージ
3日 13時間
マージ済み PR(30日)
1

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure-Samples/rag-postgres-openai-python のほかの issue

Azure-Samples/rag-postgres-openai-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。