Skip to content

Commit ed5cf0a

Browse files
committed
Better copilot instructions
1 parent 723be32 commit ed5cf0a

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.github/copilot-instructions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,24 @@ New files should be added to the `data` folder, and then either run scripts/prep
1010
* app/backend/approaches/approach.py: Base class for all approaches
1111
* app/backend/approaches/retrievethenread.py: Ask approach, just searches and answers
1212
* app/backend/approaches/chatreadretrieveread.py: Chat approach, includes query rewriting step first
13+
* app/backend/approaches/prompts/ask_answer_question.prompty: Prompt used by the Ask approach to answer the question based off sources
14+
* app/backend/approaches/prompts/chat_query_rewrite.prompty: Prompt used to rewrite the query based off search history into a better search query
15+
* app/backend/approaches/prompts/chat_query_rewrite_tools.json: Tools used by the query rewriting prompt
16+
* app/backend/approaches/prompts/chat_answer_question.prompty: Prompt used by the Chat approach to actually answer the question based off sources
1317
* app/backend/app.py: The main entry point for the backend application.
1418
* app/frontend: Contains the React frontend code, built with TypeScript, built with vite.
1519
* app/frontend/src/api: Contains the API client code for communicating with the backend.
1620
* app/frontend/src/components: Contains the React components for the frontend.
1721
* app/frontend/src/locales: Contains the translation files for internationalization.
22+
* app/frontend/src/locales/da/translation.json: Danish translations
23+
* app/frontend/src/locales/en/translation.json: English translations
24+
* app/frontend/src/locales/es/translation.json: Spanish translations
25+
* app/frontend/src/locales/fr/translation.json: French translations
26+
* app/frontend/src/locales/it/translation.json: Italian translations
27+
* app/frontend/src/locales/ja/translation.json: Japanese translations
28+
* app/frontend/src/locales/nl/translation.json: Dutch translations
29+
* app/frontend/src/locales/ptBR/translation.json: Portuguese translations
30+
* app/frontend/src/locales/tr/translation.json: Turkish translations
1831
* app/frontend/src/pages: Contains the main pages of the application
1932
* infra: Contains the Bicep templates for provisioning Azure resources.
2033
* tests: Contains the test code, including e2e tests, app integration tests, and unit tests.

app/backend/prepdocslib/embeddings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ async def create_embedding_for_text(self, q: str):
267267
) as response:
268268
json = await response.json()
269269
return json["vector"]
270-
raise ValueError("Failed to get image embedding after multiple retries.")
270+
raise ValueError("Failed to get text embedding after multiple retries.")
271271

272272
def before_retry_sleep(self, retry_state):
273273
logger.info("Rate limited on the Vision embeddings API, sleeping before retrying...")

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ line-length = 120
1313
[tool.pytest.ini_options]
1414
addopts = "-ra"
1515
pythonpath = ["app/backend", "scripts"]
16+
asyncio_default_fixture_loop_scope = "function"
1617

1718
[tool.coverage.paths]
1819
source = ["scripts", "app"]

0 commit comments

Comments
 (0)