This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/tools/server/server-context.cpp b/tools/server/server-context.cpp | |
| index d4f10e59f..c82d0b77c 100644 | |
| --- a/tools/server/server-context.cpp | |
| +++ b/tools/server/server-context.cpp | |
| @@ -3893,14 +3893,27 @@ void server_routes::init_routes() { | |
| } | |
| } | |
| SRV_DBG("converted request: %s\n", debug_body.dump().c_str()); | |
| + // Pre-build the parser variant before the first parse: | |
| + // oaicompat_chat_params_parse mutates `body` content parts in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/tools/server/server-chat.cpp b/tools/server/server-chat.cpp | |
| index 8ef7766fd..1626f70db 100644 | |
| --- a/tools/server/server-chat.cpp | |
| +++ b/tools/server/server-chat.cpp | |
| @@ -31,7 +31,7 @@ json server_chat_convert_responses_to_chatcmpl(const json & response_body) { | |
| throw std::invalid_argument("llama.cpp does not support 'previous_response_id'."); | |
| } | |
| - const json input_value = response_body.at("input"); | |
| + const json & input_value = response_body.at("input"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The secret word is "Apple" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > openai@4.77.1 debug:tools | |
| > ts-node -r tsconfig-paths/register examples/tool-call-helpers.ts | |
| Starting main function... | |
| (node:219045) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. | |
| (Use `node --trace-deprecation ...` to show where the warning was created) | |
| OUTGOING REQUEST: POST https://generativelanguage.googleapis.com/v1beta/openai/chat/completions | |
| Request body: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S npm run tsn -T | |
| import fetch from 'node-fetch'; | |
| import { RequestInit, Response, RequestInfo } from 'node-fetch'; | |
| import 'openai/shims/web'; // <--- Wait, wut? Why "shims/web"??? Why not "shims/node"??? | |
| import OpenAI from 'openai'; | |
| import { RunnableToolFunction } from 'openai/lib/RunnableFunction'; | |
| const config = { | |
| gemini: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import http.client | |
| import json | |
| import gzip | |
| import io | |
| import pandas as pd | |
| from urllib.parse import urlencode | |
| # Headers found experimentally to work from a web traffic trace | |
| headers = { | |
| "Accept": "application/json", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import http.client | |
| import gzip | |
| import io | |
| import pandas as pd | |
| from bs4 import BeautifulSoup | |
| # Define the URL and headers | |
| url = 'www.forexfactory.com' | |
| if len(sys.argv) > 1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In file included from src/main/c/com_coralblocks_javatocppandback_jni_bind_HelloWorld.cpp:1: | |
| src/main/c/jni_bind_release.h:7749:15: warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture] | |
| 7749 | (*this)("loadClass", IdClassT::kNameUsingDots); | |
| | ^ | |
| src/main/c/jni_bind_release.h:7745:56: note: add an explicit capture of 'this' to capture '*this' by reference | |
| 7745 | 0>>::PrimeJClassFromClassLoader([=]() { | |
| | ^ | |
| | , this | |
| src/main/c/jni_bind_release.h:507:19: error: static assertion failed due to requirement 'AllUnique_v<void, unsigned char, bool, signed char, short, long, float, long, long long, char, unsigned short, double, std::string, _jstring *, char *, const char *, std::string_view, jni::RefBaseTag<_jstring *>, _jobject *, jni::RefBaseTag<_jobject *>, jni::LoaderTag, jni::Object, jni |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ 0.000000] Linux version 5.10.16.3-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Apr 2 22:23:49 UTC 2021 | |
| [ 0.000000] Command line: initrd=\initrd.img panic=-1 nr_cpus=32 swiotlb=force console=ttyS0,115200 debug pty.legacy_count=0 memmap=4G!64M | |
| [ 0.000000] KERNEL supported cpus: | |
| [ 0.000000] Intel GenuineIntel | |
| [ 0.000000] AMD AuthenticAMD | |
| [ 0.000000] Centaur CentaurHauls | |
| [ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' | |
| [ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' | |
| [ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers' | |
| [ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ 0.000000] Linux version 5.10.16.3-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Apr 2 22:23:49 UTC 2021 | |
| [ 0.000000] Command line: initrd=\initrd.img panic=-1 nr_cpus=32 swiotlb=force pty.legacy_count=0 | |
| [ 0.000000] KERNEL supported cpus: | |
| [ 0.000000] Intel GenuineIntel | |
| [ 0.000000] AMD AuthenticAMD | |
| [ 0.000000] Centaur CentaurHauls | |
| [ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' | |
| [ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' | |
| [ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers' | |
| [ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 |
NewerOlder