Closed ahoepf closed 3 months ago
Same problem
{"timestamp":1697715227,"level":"INFO","function":"main","line":1755,"message":"HTTP server listening","hostname":"0.0.0.0","port":8080} Segmentation fault
getting different error from you, however, problem appears only in latest update
I don't know if this is the problem you're having, but api_like_OAI.py does not implement /v1/models
, on which some applications depend. The current version of chatbot-ui as of writing this comment, for example, will not work because it tries to fetch a list of models right off the bat.
Implementing /v1/models
should be fairly easy, though.
For the models this work for me:
@app.route('/v1/models', methods=['GET']) def get_models(): response = { "object": "list", "data": [ { "id": "gpt-3.5-turbo", "object": "model", "created": 1677610602, "owned_by": "openai", "permission": [ { "id": "modelperm-SFxxxxxxxxxxxxxxxxxxxxxxxxx", "object": "model_permission", "created": 1697465932, "allow_create_engine": False, "allow_sampling": True, "allow_logprobs": True, "allow_search_indices": False, "allow_view": True, "allow_fine_tuning": False, "organization": "*", "group": None, "is_blocking": False } ], "root": "gpt-3.5-turbo", "parent": None } ] } return jsonify(response)
add this to the api_like_OAI.py.
Thanks @ahoepf this solved it for me. I did the changes to the script here if anyone wants them.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Prerequisites
Current Behavior
I am trying to use different chatgpt GUIs with the api_like_OAI.py. To do this, I change the api_base to my api_like_OAI endpoint. The strange thing is that it works for some applications and not for others. The APP-ChatBoost works very well with api_like_OAI on Android, as well as with the "continue" plugin on VS Code. However, when I try the same with "librechat", "ChatGPTBox", "chatboxai.app", etc., the applications remain in a waiting mode and nothing happens. In the log mode, I can see that the llama.cpp server has responded and there is also a response from the api_like_OAI.py."
Environment and Context
$ python api_like_OAI.py --api-key 123456 --host 127.0.0.1 --user-name "user" --system-name "assistant"
$ ./server -c 16000 --host 127.0.0.1 -t 16 -ngl 43 -m ../../../text-generation-webui/models/mistral-7b-instruct-v0.1.Q6_K.gguf --embedding --alias gpt-3.5-turbo -v
$ lscpu
Architektur: x86_64 CPU Operationsmodus: 32-bit, 64-bit Adressgrößen: 48 bits physical, 48 bits virtual Byte-Reihenfolge: Little Endian CPU(s): 16 Liste der Online-CPU(s): 0-15 Anbieterkennung: AuthenticAMD Modellname: AMD Ryzen 7 5700G with Radeon Graphics Prozessorfamilie: 25 Modell: 80 Thread(s) pro Kern: 2 Kern(e) pro Socket: 8 Sockel: 1 Stepping: 0 Frequenzanhebung: aktiviert Maximale Taktfrequenz der CPU: 4675,7808 Minimale Taktfrequenz der CPU: 1400,0000 BogoMIPS: 7985.45 Markierungen: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_goo d nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fm a cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_lega cy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt t ce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_ps tate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_ll c cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassis ts pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vae s vpclmulqdq rdpid overflow_recov succor smca fsrm Virtualization features: Virtualisierung: AMD-V Caches (sum of all): L1d: 256 KiB (8 instances) L1i: 256 KiB (8 instances) L2: 4 MiB (8 instances) L3: 16 MiB (1 instance) NUMA: NUMA-Knoten: 1 NUMA-Knoten0 CPU(s): 0-15 Schwachstellen: Gather data sampling: Not affected Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Not affected Retbleed: Not affected Spec rstack overflow: Mitigation; safe RET, no microcode Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling, PB RSB-eIBRS Not affected Srbds: Not affected Tsx async abort: Not affected
$ uname -a
Linux ELITE-V2 6.2.0-34-generic #34~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 7 13:12:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
OPENAI_REVERSE_PROXY=http://127.0.0.1:8081/v1/chat/completions OPENAI_API_KEY=123456
$ python api_like_OAI.py --api-key 123456 --host 127.0.0.1 --user-name "user" --system-name "assistant"
$ ./server -c 16000 --host 0.0.0.0 -t 16 -ngl 43 -m ../../../text-generation-webui/models/mistral-7b-instruct-v0.1.Q6_K.gguf --embedding --alias gpt-3.5-turbo -v
Failure Logs
no errorlogs it hangs on waiting