mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-30 06:30:43 +00:00
stash progress for the night. loading GPTJ fails, hacked in PredictTEMP as kludge
This commit is contained in:
parent
8fc4b6cded
commit
0b910e0595
14 changed files with 518 additions and 193 deletions
|
@ -1,19 +0,0 @@
|
|||
// NOT ACTUALLY USING THIS CURRENTLY???
|
||||
|
||||
// ServerInterface represents all server handlers.
|
||||
type ServerInterface interface {
|
||||
{{range .}}{{.SummaryAsComment }}
|
||||
// ({{.Method}} {{.Path}})
|
||||
{{.OperationId}}(w http.ResponseWriter, r *http.Request{{genParamArgs .PathParams}}{{if .RequiresParamObject}}, params {{.OperationId}}Params{{end}})
|
||||
{{end}}
|
||||
}
|
||||
|
||||
// TypedServerInterface is used to give each endpoint a fully typed method signature for cases where we're able to route automatically
|
||||
type TypedServerInterface interface {
|
||||
{{range .}}{{.SummaryAsComment }}
|
||||
// ({{.Method}} {{.Path}})
|
||||
{{$reqBody := genDefaultRequestBodyType . -}}
|
||||
{{- if ne $reqBody "" }}{{$reqBody = printf ", body %s" $reqBody}}{{end -}}
|
||||
{{.OperationId}}(w http.ResponseWriter{{genParamArgs .PathParams}}{{if .RequiresParamObject}}, params {{.OperationId}}Params{{end}}{{$reqBody}})
|
||||
{{end}}
|
||||
}
|
|
@ -11,7 +11,6 @@ output-options:
|
|||
- mapstructure
|
||||
user-templates:
|
||||
endpoint-body-mapping.tmpl: ./openai-openapi/endpoint-body-mapping.tmpl
|
||||
# chi/chi-interface.tmpl: ./openai-openapi/chi-interface.tmpl
|
||||
# union.tmpl: "// SKIP"
|
||||
# union-and-additional-properties.tmpl: "// SKIP"
|
||||
# additional-properties.tmpl: "// SKIP"
|
|
@ -54,6 +54,14 @@ components:
|
|||
type: number
|
||||
nullable: true
|
||||
x-go-type: float64
|
||||
cutstrings:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
trimstrings:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
#@overlay/match missing_ok=True
|
||||
LocalAIImageRequestExtension:
|
||||
allOf:
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
#! This file is just for my reference during development and will be removed.
|
||||
components:
|
||||
schemas:
|
||||
CreateChatCompletionRequest:
|
||||
type: object
|
||||
properties:
|
||||
model:
|
||||
description: ID of the model to use. Currently, only `gpt-3.5-turbo` and `gpt-3.5-turbo-0301` are supported.
|
||||
type: string
|
||||
messages:
|
||||
description: The messages to generate chat completions for, in the [chat format](/docs/guides/chat/introduction).
|
||||
type: array
|
||||
minItems: 1
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionRequestMessage'
|
||||
temperature:
|
||||
type: number
|
||||
minimum: 0
|
||||
maximum: 2
|
||||
default: 1
|
||||
example: 1
|
||||
nullable: true
|
||||
description: *completions_temperature_description
|
||||
CreateImageRequest:
|
||||
type: object
|
||||
properties:
|
||||
prompt:
|
||||
description: A text description of the desired image(s). The maximum length is 1000 characters.
|
||||
type: string
|
||||
example: "A cute baby sea otter"
|
Loading…
Add table
Add a link
Reference in a new issue