Skip to content

Commit

Permalink
Fixed textgen and mancer issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Oct 28, 2023
1 parent c02076a commit c2de560
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
16 changes: 9 additions & 7 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const Home = () => {
no_repeat_ngram_size: parseInt(presetTGWUI.no_repeat_ngram_size),
num_beams: parseInt(presetTGWUI.num_beams),
penalty_alpha: parseFloat(presetTGWUI.penalty_alpha),
length_penalty: parseFloat(presetTGWUI.length_penalt),
length_penalty: parseFloat(presetTGWUI.length_penalty),
early_stopping: presetTGWUI.early_stopping,
mirostat_mode: parseInt(presetTGWUI.mirostat_mode),
mirostat_eta: parseFloat(presetTGWUI.mirostat_eta),
Expand Down Expand Up @@ -379,14 +379,16 @@ const Home = () => {
}

const TGWUIReponseStream = async () => {
const check = await fetch(`https://neuro.mancer.tech/webui/${mancerModel.id}/api/v1/model`, {
if(APIType === API.MANCER) {
const check = await fetch(`https://neuro.mancer.tech/webui/${mancerModel?.id}/api/v1/model`, {
method: 'GET',
headers: {'X-API-KEY': mancerKey}
})
if(check.status !== 200) {
setNowGenerating(false)
ToastAndroid.show(`Invalid Model or API key!`, 3000)
return
})
if(check.status !== 200) {
setNowGenerating(false)
ToastAndroid.show(`Invalid Model or API key!`, 3000)
return
}
}
//return
try {
Expand Down
8 changes: 5 additions & 3 deletions components/Endpoint/Mancer.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ const Mancer = () => {
setKeyInput('')
ToastAndroid.show('Key saved!', 2000)
}}>
<FontAwesome name='save' color={Color.Button} size={28} />


<FontAwesome name='save' color={Color.Button} size={28} />
</TouchableOpacity>
</View>
<View style={styles.dropdownContainer}>
Expand All @@ -75,7 +77,7 @@ const Mancer = () => {
/>
</View>


{(mancerModel !== undefined) &&
<View style={styles.modelInfo}>
<Text style={{...styles.title, marginBottom: 8}}>{mancerModel.name}</Text>
<View style={{flexDirection: 'row'}}>
Expand All @@ -92,7 +94,7 @@ const Mancer = () => {
<Text style={{color:Color.Offwhite}}>: {mancerModel.pricing.prompt}</Text>
</View>
</View>
</View>
</View>}
</View>
)
}
Expand Down

0 comments on commit c2de560

Please sign in to comment.