Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$%7Bart_info.art.src%7D?q=api&page=68&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 15267 results for "api"(1415ms)

myApi1 file match

@carlvonblixen•Updated 1 year ago

myApi1 file match

@qaispalekar•Updated 1 year ago

myApi2 file matches

@mluccone•Updated 1 year ago

myApi1 file match

@jacob_kettle•Updated 1 year ago

postHogAPICapture1 file match

@ianvph•Updated 1 year ago

myApi1 file match

@ollypolly•Updated 1 year ago

pineconenew-file-6541.tsx4 matches

@mees•Updated 38 mins ago
11
12 try {
13 // Test creating a thread with v2 API
14 const response = await fetch("https://api.openai.com/v1/threads", {
15 method: "POST",
16 headers: {
17 "Authorization": `Bearer ${Deno.env.get("OPENAI_API_KEY")}`,
18 "Content-Type": "application/json",
19 "OpenAI-Beta": "assistants=v2",
35 JSON.stringify(
36 {
37 test: "v2 API Test",
38 status: response.status,
39 headers_sent: {

ChatApp.tsx8 matches

@c15r•Updated 39 mins ago
19
20export interface AppConfig {
21 anthropicApiKey: string;
22 mcpServers: MCPServer[];
23 selectedModel: string;
36export default function App() {
37 const [config, setConfig] = useState<AppConfig>({
38 anthropicApiKey: "",
39 mcpServers: DEFAULT_MCP_SERVERS,
40 selectedModel: "claude-3-5-sonnet-20241022",
45 // Load config from localStorage on mount
46 useEffect(() => {
47 const savedApiKey = localStorage.getItem("anthropic_api_key");
48 const savedMcpServers = localStorage.getItem("mcp_servers");
49 const savedMessages = localStorage.getItem("chat_messages");
51
52 setConfig({
53 anthropicApiKey: savedApiKey || "",
54 mcpServers: savedMcpServers ? JSON.parse(savedMcpServers) : DEFAULT_MCP_SERVERS,
55 selectedModel: savedModel || "claude-3-5-sonnet-20241022",
66 }
67
68 // Show settings if no API key is configured
69 if (!savedApiKey) {
70 setShowSettings(true);
71 }
74 // Save config to localStorage when it changes
75 useEffect(() => {
76 if (config.anthropicApiKey) {
77 localStorage.setItem("anthropic_api_key", config.anthropicApiKey);
78 }
79 localStorage.setItem("mcp_servers", JSON.stringify(config.mcpServers));
Kapil01
apiv1