package
0.0.0-20250324124226-2fe9b5bc14ef
Repository: https://github.com/laisky/go-ramjet.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
Chat render chat page.
ChatHandler handle api request.
ChatModel return chat model.
ConvertImageToPNG converts a WebP image to PNG format.
CopyHeader copy header from `from` to `to`.
CountVisionImagePrice count vision image tokens https://openai.com/pricing.
CreateDeepResearchHandler deepresearch handler.
No description provided by the author
No description provided by the author
DrawByFlux draw image by flux-pro.
No description provided by the author
No description provided by the author
No description provided by the author
FetchURLContent fetch url content.
GetCurrentUser get current user.
GetDeepResearchStatusHandler get deepresearch status.
GetUserInternalBill get user internal bill.
No description provided by the author
NewNvidiaDrawImageBySdxlturboRequest create new request.
NewOpenaiCreateImageRequest create new request.
OneapiProxyHandler proxy to oneapi url.
OneshotChat get ai response from gpt-3.5-turbo # Args: - systemPrompt: system prompt - userPrompt: user prompt.
OneShotChatHandler handle one shot chat request.
No description provided by the author
No description provided by the author
RamjetProxyHandler proxy to ramjet url.
RegisterStatic register static files.
SaveLlmConservationHandler save llm conservation.
SetupHTTPCli setup http client.
Tiktoken return tiktoken, could be nil if not found.
No description provided by the author
Transcript transcribe audio to text.
TTSHanler text to speech by azure, will return audio stream.
UploadFiles upload files.
No description provided by the author

# Constants

ExternalBillingUserStatusActive active.
OpenaiMessageRoleAI ai message.
OpenaiMessageRoleSystem system message.
OpenaiMessageRoleUser user message.
OpenaiVisionMessageContentTypeImageUrl image url.
OpenaiVisionMessageContentTypeText text.
UserQueryTypeScan scan by map-reduce.
UserQueryTypeSearch search by embeddings chunks.
VisionImageResolutionHigh high resolution.
VisionImageResolutionLow low resolution.
VisionTokenPrice vision token price($/500000).

# Variables

No description provided by the author

# Structs

AzureCreateImageResponse return from azure image api.
CreateDeepresearchRequest deepresearch request.
DrawImageByFluxProResponse is response of DrawImageByFluxProRequest https://replicate.com/black-forest-labs/flux-pro?prediction=kg1krwsdf9rg80ch1sgsrgq7h8&output=json.
DrawImageByFluxReplicateRequest draw image by fluxpro https://replicate.com/black-forest-labs/flux-pro?prediction=kg1krwsdf9rg80ch1sgsrgq7h8&output=json.
DrawImageByFluxSegmind is request to draw image by flux schnell https://www.segmind.com/models/flux-schnell/api.
DrawImageByImageRequest draw image by image and prompt.
DrawImageByLcmRequest draw image by image and prompt with lcm.
DrawImageByLcmResponse draw image by image and prompt with lcm.
No description provided by the author
No description provided by the author
DrawImageByTextRequest draw image by text and prompt.
ExternalBillingUserResponse return from external billing api.
FluxInpaintingInput is input of DrawImageByFluxProRequest https://replicate.com/black-forest-labs/flux-fill-pro/api/schema.
FluxInput is input of DrawImageByFluxProRequest https://replicate.com/black-forest-labs/flux-1.1-pro/api/schema.
FluxMetrics is metrics of DrawImageByFluxProResponse.
FluxURLs is urls of DrawImageByFluxProResponse.
FrontendReq request from frontend.
FrontendReqMessage request message from frontend.
No description provided by the author
InpaintingImageByFlusReplicateRequest is request to inpainting image by flux pro https://replicate.com/black-forest-labs/flux-fill-pro/api/schema.
No description provided by the author
NvidiaArtifact draw image artifact.
NvidiaDrawImageBySdxlturboRequest draw image by image and prompt with sdxlturbo https://build.nvidia.com/explore/discover?snippet_tab=Python#sdxl-turbo.
NvidiaDrawImageBySdxlturboResponse draw image by image and prompt with sdxlturbo.
NvidiaTextPrompt text prompt.
OneShotChatRequest request to one-shot chat api.
OpenaiChatReq request to openai chat api.
OpenaiChatReqTool define tools { "type": "function", "function": { "name": "get_current_weather", "description": "Get the current weather in a given location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OpenaiCompletionReq request to openai chat api.
nolint: lll OpenaiCompletionResp return from openai chat api https://platform.openai.com/docs/guides/chat/response-format { "id": "chatcmpl-6p9XYPYSTTRi0xEviKjjilqrWU2Ve", "object": "chat.completion", "created": 1677649420, "model": "gpt-3.5-turbo", "usage": {"prompt_tokens": 56, "completion_tokens": 31, "total_tokens": 87}, "choices": [ { "message": { "role": "assistant", "content": "The 2020 World Series was played in Arlington, Texas at the Globe Life Field, which was the new home stadium for the Texas Rangers."}, "finish_reason": "stop", "index": 0 } ] }.
OpenaiCompletionStreamResp stream chunk return from openai chat api { "id":"chatcmpl-6tCPrEY0j5l157mOIddZi4I0tIFhv", "object":"chat.completion.chunk", "created":1678613787, "model":"gpt-3.5-turbo-0301", "choices":[{"delta":{"role":"assistant"}, "index":0, "finish_reason":null}] }.
No description provided by the author
No description provided by the author
OpenaiCompletionStreamRespToolCall tool call { "id": "call_abc123", "type": "function", "function": { "name": "get_current_weather", "arguments": "{\n\"location\": \"Boston, MA\"\n}" } }.
OpenaiCreateImageRequest request to openai image api.
OpenaiCreateImageResponse return from openai image api.
OpenaiReqMessage request message to openai chat api chat completion message and vision message have different content.
OpenaiVisionMessageContent vision message content.
OpenaiVisionMessageContentImageUrl image url.
No description provided by the author
https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#implementing-extended-thinking.
TranscriptionResponse is the request struct for speech to text.
TranscriptRequest is the request struct for speech to text.

# Type aliases

ExternalBillingUserStatus user status.
OpenaiMessageRole message role.
OpenaiVisionMessageContentType vision message content type.
UserQueryType user query type.
VisionImageResolution image resolution.