Skip to content

Instantly share code, notes, and snippets.

@olp-cs
Last active December 17, 2024 13:16
Show Gist options
  • Select an option

  • Save olp-cs/f9f7197e3b3af9cda58994e9dbbe8e98 to your computer and use it in GitHub Desktop.

Select an option

Save olp-cs/f9f7197e3b3af9cda58994e9dbbe8e98 to your computer and use it in GitHub Desktop.
Running Harmony API tests - 2024-08-11.md

System

  • Ubuntu 24.04 LTS
  • Python 3.10.14

Setting up the environment

git submodule update --init
pip install -r requirements.txt

export GOOGLE_APPLICATION_CREDENTIALS='{
  "type": "service_account",
   ...
}'
export AZURE_OPENAI_ENDPOINT="https://_________.openai.azure.com/openai/deployments/fds-text-embedding-3-large/embeddings?api-version=2023-05-15"
export AZURE_OPENAI_API_KEY="..."
export OPENAI_API_KEY="..."

I added the credentials copied/downloaded from Google, Azure, and Open AI.

I created a new Azure OpenAI resource (region: East US), went to the Azure OpenAI Studio, and deployed a model called text-embedding-3-large with the deployment name fds-text-embedding-3-large.

Running Tika

wget https://archive.apache.org/dist/tika/2.3.0/tika-server-standard-2.3.0.jar
java -jar tika-server-standard-2.3.0.jar 

Running Uvicorn

uvicorn main:app_fastapi --host 0.0.0.0 --port 8000

http://0.0.0.0:8000/docs opens as expected.

Local tests

python -m unittest discover tests/local_tests
  • Before the changes: 18/18 passed
  • After the changes: 18/18 passed
@animesh-77
Copy link

Thanks for this @olp-cs 🙌 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment