From 6cddfd0ef7e4cef25d50248ff1badad17c9533e4 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Oct 2024 14:01:35 +0000 Subject: [PATCH] picocss and highlight.js themes modified: index.html --- index.html | 248 ++++++++++++++++++++++++----------------------------- 1 file changed, 110 insertions(+), 138 deletions(-) diff --git a/index.html b/index.html index 7a6ba3d..83143cb 100644 --- a/index.html +++ b/index.html @@ -5,116 +5,86 @@ + Using Free Hermes AI Service | ai.unturf.com + + - - - - body { - font-family: Arial, sans-serif; - line-height: 1.6; - margin: 40px auto; - padding: 40px; - max-width: 960px; - background-color: #f4f4f4; - } + + + - h1.unturf { - font-family: 'ChunkFiveRegular'; - } - - h1, h2, h3 { - color: #333; - font-family: sans-serif; - } - - code { - background-color: #e8e8e8; - padding: 5px; - border-radius: 5px; - } - - pre { - background-color: #e8e8e8; - padding: 10px; - border-radius: 5px; - overflow-x: auto; - } - - /* Dark Mode adjustments */ - @media (prefers-color-scheme: dark) { - body { - background-color: #1e1e1e; - color: #f4f4f4; - } - - code, - pre { - background-color: #333; - color: #f4f4f4; - } - - h1, h2, h3 { - color: #f4f4f4; - } - - #remarkbox-iframe { - background-color: #1e1e1e; - color: #f4f4f4; + + -

unturf.

-

Welcome to ai.unturf.com

-

At ai.unturf.com, we offer a free AI service powered by the model NousResearch/Hermes-3-Llama-3.1-8B. Our mission is to provide accessible AI tools for everyone, embodying the principles of both free as in beer & free as in freedom. You can interact with our model without any cost, and you are encouraged to contribute and build upon the open-source code & models that we use.

+
+
+

unturf.

+

Welcome to ai.unturf.com - Free AI Service Powered by Hermes AI

+
+ +
-

Using the Hermes AI Model

-

This guide explains how to use the official OpenAI client to interact with the Hermes AI model hosted at hermes.ai.unturf.com/v1. You can use this endpoint without an API key.

+
+

Using the Hermes AI Model

+

At ai.unturf.com, we offer a free AI service powered by the model NousResearch/Hermes-3-Llama-3.1-8B. Our mission is to provide accessible AI tools for everyone, embodying the principles of both free as in beer & free as in freedom. You can interact with our model without any cost, and you are encouraged to contribute and build upon the open-source code & models that we use.

-

Installing the OpenAI Client

-

Python

-

To install the OpenAI package for Python, use pip:

-
pip install openai
+

Installing the OpenAI Client

+

Python

+

To install the OpenAI package for Python, use pip:

+
pip install openai
-

Node.js

-

To install the OpenAI package for Node.js, you can use npm in your package.json:

-
{
+        

Node.js

+

To install the OpenAI package for Node.js, you can use npm in your package.json:

+
{
   "dependencies": {
     "openai": "^v4.67.3"  // Use the latest version
   }
 }
-    
-

Run the following command to install it:

-
npm install
+
+

Run the following command to install it:

+
npm install
-

Python Example

-

Non-Streaming

-

+        

Python Example

+

Non-Streaming

+
# Python Fizzbuzz Example
 from openai import OpenAI
 
 client = OpenAI(base_url="https://hermes.ai.unturf.com/v1", api_key="none")
 
-# Set your model
 MODEL = "NousResearch/Hermes-3-Llama-3.1-8B"
 
-# Define your messages
 messages = [{"role": "user", "content": "Give a Python Fizzbuzz solution in one line of code?"}]
 
-# Make the request
 response = client.chat.completions.create(
     model=MODEL,
     messages=messages,
@@ -122,25 +92,21 @@ response = client.chat.completions.create(
     max_tokens=150
 )
 
-# Print the response
 print(response.choices[0].message.content)
-    
+
-

Streaming

-

+        

Streaming

+
# Streaming response in Python
 from openai import OpenAI
 
 client = OpenAI(base_url="https://hermes.ai.unturf.com/v1", api_key="none")
 
-# Set your model
 MODEL = "NousResearch/Hermes-3-Llama-3.1-8B"
 
-# Define your messages
 messages = [
     {"role": "user", "content": "Give a Python Fizzbuzz solution in one line of code?"}
 ]
 
-# Make the streaming request
 response = client.chat.completions.create(
     model=MODEL,
     messages=messages,
@@ -149,16 +115,14 @@ response = client.chat.completions.create(
     stream=True,  # Enable streaming
 )
 
-# Print each message in the streaming response
 for chunk in response:
-    # The 'ChatCompletionChunk' object exposes the 'choices' attribute directly
     if hasattr(chunk.choices[0].delta, "content"):
         print(chunk.choices[0].delta.content, end="")
-    
+
-

Node.js Example

-

Non-Streaming

-
const OpenAI = require('openai');
+        

Node.js Example

+

Non-Streaming

+
const OpenAI = require('openai');
 
 const client = new OpenAI({
     baseURL: "https://hermes.ai.unturf.com/v1",
@@ -185,10 +149,10 @@ async function getResponse() {
 }
 
 getResponse();
-    
+
-

Streaming

-

+        

Streaming

+

 const OpenAI = require('openai');
 
 const client = new OpenAI({
@@ -221,60 +185,68 @@ async function streamResponse() {
 }
 
 streamResponse();
-    
+
-

How we run inference if you wanted to try to contribute

+

How we run inference if you wanted to try to contribute

-

We use vLLM to run models, currently full f16 safetensors. We make sure to use a virtualenv to hold the dependencies.

-

We are considering supporting ollama for better quant support.

-

+        

We use vLLM to run models, currently full f16 safetensors. We make sure to use a virtualenv to hold the dependencies.

+

We are considering supporting ollama for better quant support.

+

 cd ~
 python3 -m venv env
 source env/bin/activate
 pip install vllm
 python -m vllm.entrypoints.openai.api_server --model NousResearch/Hermes-3-Llama-3.1-8B --host 0.0.0.0 --port 18888 --max-model-len 16000
-    
+
-

Questions, Comments, Discussions

-
- -
- - + + function create_remarkbox_iframe() { + var ifrm = document.createElement("iframe"); + ifrm.setAttribute("id", "remarkbox-iframe"); + ifrm.setAttribute("scrolling", "no"); + ifrm.setAttribute("src", rb_src); + ifrm.setAttribute("frameborder", "0"); + ifrm.setAttribute("tabindex", "0"); + ifrm.setAttribute("title", "Remarkbox"); + ifrm.style.width = "100%"; + document.getElementById("remarkbox-div").appendChild(ifrm); + } + create_remarkbox_iframe(); + iFrameResize( + { + checkOrigin: ["https://my.remarkbox.com"], + inPageLinks: true, + initCallback: function(e) { e.iFrameResizer.moveToAnchor(thread_fragment) } + }, + document.getElementById("remarkbox-iframe") + ); + + + +
+ +