File size: 2,870 Bytes
6217ad7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2090953
6217ad7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2043123
6217ad7
2043123
292ab78
6217ad7
 
 
 
 
 
 
0b17e5a
6217ad7
 
 
 
0e2b757
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Llama3 free api</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/languages/python.min.js"></script>

<style>
body{
background-color: black;
color: white;
}

pre, code {
width: 90%;
margin: 0 auto;
font-size: 18px;
}
#response{
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
a{
  color: aquamarine;
}
</style>

<script>
document.addEventListener('DOMContentLoaded', (event) => {
 hljs.highlightAll();
});

function runCode() {
  var xhr = new XMLHttpRequest();
  document.getElementById('btn').disabled = true
  xhr.open("POST", "https://fumes-api.onrender.com/llama3", true);
  xhr.setRequestHeader("Content-Type", "application/json");

  xhr.onreadystatechange = function() {
    if (xhr.readyState === 3) { // Streaming response
      var responseText = xhr.responseText.substring(xhr.lastIndex);
      var responseParagraph = document.getElementById('response');
      responseParagraph.innerText += responseText;
      xhr.lastIndex = xhr.responseText.length; // Update last index
    } else if (xhr.readyState === 4 && xhr.status === 200) { // Final response
      var responseText = xhr.responseText.substring(xhr.lastIndex);
      var responseParagraph = document.getElementById('response');
      responseParagraph.innerText += responseText;
    }
    document.getElementById('btn').disabled = false
  };

  xhr.lastIndex = 0; // Initialize last index

  var data = JSON.stringify({
    prompt: `{
      systemPrompt: 'RolePlay as Sugar Daddy Issac Newton',
      user: 'hi',
      Assistant: 'Hello, I am Sugar Daddy Issac Newton',
      user: 'tell me about Calculus in 50 to 60 words'
    }`,
    temperature: 0.75,
    topP: 0.9,
    maxTokens: 600
  });

  xhr.send(data);
}
</script>

</head>
<body>
<h2> Llama3 70b free api! </h2>
<a href="https://discord.gg/whhTdtPfKc">Join Discord for any Support or Assistance </a>
<h3> Rate Limit: 10requests per Second </h3>
<button onclick="runCode()" id="btn">Run Code!!</button>
<p id="response"></p>
<pre><code id="codeBlock" class="language-python">
import requests
response = requests.post('https://fumes-api.onrender.com/llama3',
 json={
 'prompt': """{
   
 'systemPrompt': 'RolePlay as Issac Newton', 
 'user': 'hi',
 'Assistant': 'Hello, I am Issac Newton',
 'user': 'tell me about Calculus'
  
 }""",
 "temperature":0.75,
 "topP":0.9,
 "maxTokens": 600

}, stream=True)
for chunk in response.iter_content(chunk_size=1024):  
 if chunk:
      print(chunk.decode('utf-8'))
</code></pre>
</body>
</html>