mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	 2e666832e6
			
		
	
	2e666832e6
	
	
	
		
			
			* ic * migrate my eary work * add the belonging stuff: css,favicon etc * de prompts * chore: Update HTML meta tags in index.html file * add api-key css classes * some necessary fixes * Add API key CSS classes and update styling in style.css * clean the code * move API to the top, rearrange param sliders. update css * add tooltips to the parameters with comprehensible explanations * fix FloatField and BoolField tooltips * fix grammar field width * use template literales for promptFormats.js * update const ModelGenerationInfo * remove ms per token, since not relevant for most webui users and use cases * add phi-3 prompt template * add phi3 to dropdown * add css class * update forgotten css theme * add user message suffix * fix chatml & add llama3 format * fix llama3 prompt template * more prompt format fixes * add more comon stop tokens * add missing char * do not separate with new line or comma * move prompt style * add hacky llama2 prompt solution, reduce redundancy in promptFormats.js * fix toggle state localstorage * add cmd-r prompt et reduce redundancy * set default prompt to empty * move files, clean code * fix css path * add a button to the new ui * move new ui to "/public" due to otherwise problematic CORS behaviour * include new ui in cpp * fix wrong link to old ui * renaming to ensure consistency * fix typos "prompt-format" -> "prompt-formats" * use correct indent * add new ui files to makefile * fix typo
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
| set(TARGET server)
 | |
| option(LLAMA_SERVER_VERBOSE "Build verbose logging option for Server" ON)
 | |
| option(LLAMA_SERVER_SSL "Build SSL support for the server" OFF)
 | |
| include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
 | |
| set(TARGET_SRCS
 | |
|     server.cpp
 | |
|     utils.hpp
 | |
|     httplib.h
 | |
| )
 | |
| set(PUBLIC_ASSETS
 | |
|     colorthemes.css
 | |
|     style.css
 | |
|     theme-beeninorder.css
 | |
|     theme-ketivah.css
 | |
|     theme-mangotango.css
 | |
|     theme-playground.css
 | |
|     theme-polarnight.css
 | |
|     theme-snowstorm.css
 | |
|     index.html
 | |
|     index-new.html
 | |
|     index.js
 | |
|     completion.js
 | |
|     system-prompts.js
 | |
|     prompt-formats.js
 | |
|     json-schema-to-grammar.mjs
 | |
| )
 | |
| foreach(asset ${PUBLIC_ASSETS})
 | |
|     set(input "${CMAKE_CURRENT_SOURCE_DIR}/public/${asset}")
 | |
|     set(output "${CMAKE_CURRENT_BINARY_DIR}/${asset}.hpp")
 | |
|     list(APPEND TARGET_SRCS ${output})
 | |
|     add_custom_command(
 | |
|         DEPENDS "${input}"
 | |
|         OUTPUT "${output}"
 | |
|         COMMAND "${CMAKE_COMMAND}" "-DINPUT=${input}" "-DOUTPUT=${output}" -P "${PROJECT_SOURCE_DIR}/scripts/xxd.cmake"
 | |
|     )
 | |
| endforeach()
 | |
| add_executable(${TARGET} ${TARGET_SRCS})
 | |
| install(TARGETS ${TARGET} RUNTIME)
 | |
| target_compile_definitions(${TARGET} PRIVATE
 | |
|     SERVER_VERBOSE=$<BOOL:${LLAMA_SERVER_VERBOSE}>
 | |
| )
 | |
| target_link_libraries(${TARGET} PRIVATE common ${CMAKE_THREAD_LIBS_INIT})
 | |
| if (LLAMA_SERVER_SSL)
 | |
|     find_package(OpenSSL REQUIRED)
 | |
|     target_link_libraries(${TARGET} PRIVATE OpenSSL::SSL OpenSSL::Crypto)
 | |
|     target_compile_definitions(${TARGET} PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
 | |
| endif()
 | |
| if (WIN32)
 | |
|     TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ws2_32)
 | |
| endif()
 | |
| target_compile_features(${TARGET} PRIVATE cxx_std_11)
 |