Skip to content

Commit

Permalink
fix: missing horde header due to old code removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Jun 18, 2024
1 parent d6bbfc1 commit c091eae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/Endpoint/Horde.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { hordeHeader } from '@constants/Inference'
import { hordeHeader } from '@constants/APIState/HordeAPI'
import { FontAwesome, MaterialIcons } from '@expo/vector-icons'
import { Global, Logger, Style } from '@globals'
import { useState, useEffect, useRef } from 'react'
Expand Down
12 changes: 6 additions & 6 deletions constants/APIState/HordeAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { nativeApplicationVersion } from 'expo-application'

import { APIBase, APISampler } from './BaseAPI'

export const hordeHeader = () => {
return {
'Client-Agent': `ChatterUI:${nativeApplicationVersion}:https://github.com/Vali-98/ChatterUI`,
}
}

class HordeAPI extends APIBase {
samplers: APISampler[] = [
{ externalName: 'max_context_length', samplerID: SamplerID.CONTEXT_LENGTH },
Expand Down Expand Up @@ -177,11 +183,5 @@ class HordeAPI extends APIBase {
}
}

export const hordeHeader = () => {
return {
'Client-Agent': `ChatterUI:${nativeApplicationVersion}:https://github.com/Vali-98/ChatterUI`,
}
}

const hordeAPI = new HordeAPI()
export default hordeAPI

0 comments on commit c091eae

Please sign in to comment.