Last updated 5 months ago
See our full reference implementation .
Note: This page assumes you are using MacOS or Linux. See the reference implementation for Windows instructions.
python3 -m venv venv source venv/bin/activate # Add Buf registry to virtual environment printf " [global] extra-index-url = https://buf.build/gen/python " > venv/pip.conf
pip install fxnlabs-api-gateway-community-danielgtaylor-betterproto pip install grpclib
api_key = 'MY_FXN_API_KEY' channel = Channel('api.function.network') client = APIGatewayServiceStub(channel, metadata=[('authorization', f'Bearer {api_key}')])
async def main(): # Create a text embedding response = await client.embed( model='baai/bge-small-en-v1.5', input='Embed me so I can use it for RAG Pipelines', ) print(response) if __name__ == "__main__": asyncio.run(main())