Compare commits
	
		
			12 Commits
		
	
	
		
			main
			...
			royh-opena
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					568416ba17 | ||
| 
						 | 
					80cba42ab2 | ||
| 
						 | 
					6477a7aca4 | ||
| 
						 | 
					51214ddef5 | ||
| 
						 | 
					b950d749a9 | ||
| 
						 | 
					3702ed7532 | ||
| 
						 | 
					6266603b17 | ||
| 
						 | 
					2644c4e682 | ||
| 
						 | 
					04cde43b2a | ||
| 
						 | 
					105e36765d | ||
| 
						 | 
					fa7be5aab4 | ||
| 
						 | 
					02169f3e60 | 
@@ -27,6 +27,11 @@ chat_completion = client.chat.completions.create(
 | 
			
		||||
    ],
 | 
			
		||||
    model='llama3',
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
completion = client.completions.create(
 | 
			
		||||
    model="llama3",
 | 
			
		||||
    prompt="Say this is a test"
 | 
			
		||||
)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### OpenAI JavaScript library
 | 
			
		||||
@@ -45,6 +50,11 @@ const chatCompletion = await openai.chat.completions.create({
 | 
			
		||||
  messages: [{ role: 'user', content: 'Say this is a test' }],
 | 
			
		||||
  model: 'llama3',
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
const completion = await openai.completions.create({
 | 
			
		||||
    model: "llama3",
 | 
			
		||||
    prompt: "Say this is a test.",
 | 
			
		||||
})
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### `curl`
 | 
			
		||||
@@ -66,6 +76,12 @@ curl http://localhost:11434/v1/chat/completions \
 | 
			
		||||
        ]
 | 
			
		||||
    }'
 | 
			
		||||
 | 
			
		||||
curl http://localhost:11434/v1/completions \
 | 
			
		||||
    -H "Content-Type: application/json" \
 | 
			
		||||
    -d '{
 | 
			
		||||
        "model": "llama3",
 | 
			
		||||
        "prompt": "Say this is a test"
 | 
			
		||||
    }'
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Endpoints
 | 
			
		||||
@@ -103,8 +119,71 @@ curl http://localhost:11434/v1/chat/completions \
 | 
			
		||||
- [ ] `user`
 | 
			
		||||
- [ ] `n`
 | 
			
		||||
 | 
			
		||||
### `/v1/completions`
 | 
			
		||||
 | 
			
		||||
#### Supported features
 | 
			
		||||
 | 
			
		||||
- [x] Completions
 | 
			
		||||
- [x] Streaming
 | 
			
		||||
- [x] JSON mode
 | 
			
		||||
- [x] Reproducible outputs
 | 
			
		||||
- [ ] Logprobs
 | 
			
		||||
 | 
			
		||||
#### Supported request fields
 | 
			
		||||
 | 
			
		||||
- [x] `model`
 | 
			
		||||
- [x] `prompt`
 | 
			
		||||
- [x] `frequency_penalty`
 | 
			
		||||
- [x] `presence_penalty`
 | 
			
		||||
- [x] `seed`
 | 
			
		||||
- [x] `stop`
 | 
			
		||||
- [x] `stream`
 | 
			
		||||
- [x] `temperature`
 | 
			
		||||
- [x] `top_p`
 | 
			
		||||
- [x] `max_tokens`
 | 
			
		||||
- [x] `suffix`
 | 
			
		||||
- [ ] `best_of`
 | 
			
		||||
- [ ] `echo`
 | 
			
		||||
- [ ] `logit_bias`
 | 
			
		||||
- [ ] `user`
 | 
			
		||||
- [ ] `n`
 | 
			
		||||
 | 
			
		||||
#### Notes
 | 
			
		||||
 | 
			
		||||
- `prompt` currently only accepts a string
 | 
			
		||||
 | 
			
		||||
### `/v1/completions`
 | 
			
		||||
 | 
			
		||||
#### Supported features
 | 
			
		||||
 | 
			
		||||
- [x] Completions
 | 
			
		||||
- [x] Streaming
 | 
			
		||||
- [x] JSON mode
 | 
			
		||||
- [x] Reproducible outputs
 | 
			
		||||
- [ ] Logprobs
 | 
			
		||||
 | 
			
		||||
#### Supported request fields
 | 
			
		||||
 | 
			
		||||
- [x] `model`
 | 
			
		||||
- [x] `prompt`
 | 
			
		||||
- [x] `frequency_penalty`
 | 
			
		||||
- [x] `presence_penalty`
 | 
			
		||||
- [x] `seed`
 | 
			
		||||
- [x] `stop`
 | 
			
		||||
- [x] `stream`
 | 
			
		||||
- [x] `temperature`
 | 
			
		||||
- [x] `top_p`
 | 
			
		||||
- [x] `max_tokens`
 | 
			
		||||
- [ ] `best_of`
 | 
			
		||||
- [ ] `echo`
 | 
			
		||||
- [ ] `suffix`
 | 
			
		||||
- [ ] `logit_bias`
 | 
			
		||||
- [ ] `user`
 | 
			
		||||
- [ ] `n`
 | 
			
		||||
 | 
			
		||||
#### Notes
 | 
			
		||||
 | 
			
		||||
- `prompt` currently only accepts a string
 | 
			
		||||
- `usage.prompt_tokens` will be 0 for completions where prompt evaluation is cached
 | 
			
		||||
 | 
			
		||||
## Models
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user