From 8dad79af8b18c08e270382ce1b18a3956fa59626 Mon Sep 17 00:00:00 2001
From: Ty Dunn <ty@tydunn.com>
Date: Thu, 7 Sep 2023 11:19:38 -0700
Subject: adding support for Hugging Face Inference Endpoints (#460)

* stream complete sketch

* correct structure but issues

* refactor: :art: clean up hf_inference_api.py

* fix: :bug: quick fix in hf_infrerence_api.py

* feat: :memo: update documentation code for hf_inference_api

* hf docs

* now working

---------

Co-authored-by: Nate Sesti <sestinj@gmail.com>
---
 extension/react-app/src/components/ModelSelect.tsx | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'extension/react-app/src/components/ModelSelect.tsx')

diff --git a/extension/react-app/src/components/ModelSelect.tsx b/extension/react-app/src/components/ModelSelect.tsx
index e6c0e9c9..6a7692ff 100644
--- a/extension/react-app/src/components/ModelSelect.tsx
+++ b/extension/react-app/src/components/ModelSelect.tsx
@@ -59,6 +59,14 @@ const MODEL_INFO: { title: string; class: string; args: any }[] = [
     class: "LlamaCpp",
     args: {},
   },
+  {
+    title: "HuggingFace Inference API",
+    class: "HuggingFaceInferenceAPI",
+    args: {
+      endpoint_url: "<INFERENCE_API_ENDPOINT_URL>", 
+      hf_token: "<HUGGING_FACE_TOKEN>",
+    },
+  },
   {
     title: "Other OpenAI-compatible API",
     class: "GGML",
-- 
cgit v1.2.3-70-g09d2

