Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -68,7 +68,7 @@ def perform_rag(repo_data, prompt):
|
|
| 68 |
return None
|
| 69 |
|
| 70 |
# Perform generation using OpenAI
|
| 71 |
-
llm = OpenAI(api_key=openai_api_key, model="gpt-
|
| 72 |
question_with_context = f"Context: {text}\n\nQuestion: {prompt}\n\nAnswer:"
|
| 73 |
response = llm.generate(question_with_context)
|
| 74 |
|
|
@@ -83,7 +83,7 @@ def perform_rag(repo_data, prompt):
|
|
| 83 |
|
| 84 |
# Streamlit application
|
| 85 |
def main():
|
| 86 |
-
st.title("Chat with GitHub Repository
|
| 87 |
st.caption("This app allows you to chat with a GitHub Repo using OpenAI and ChromaDB")
|
| 88 |
|
| 89 |
# Get the GitHub token from the user
|
|
|
|
| 68 |
return None
|
| 69 |
|
| 70 |
# Perform generation using OpenAI
|
| 71 |
+
llm = OpenAI(api_key=openai_api_key, model="gpt-4o-mini", temperature=0.7, max_tokens=500)
|
| 72 |
question_with_context = f"Context: {text}\n\nQuestion: {prompt}\n\nAnswer:"
|
| 73 |
response = llm.generate(question_with_context)
|
| 74 |
|
|
|
|
| 83 |
|
| 84 |
# Streamlit application
|
| 85 |
def main():
|
| 86 |
+
st.title("Chat with GitHub Repository")
|
| 87 |
st.caption("This app allows you to chat with a GitHub Repo using OpenAI and ChromaDB")
|
| 88 |
|
| 89 |
# Get the GitHub token from the user
|